skills_dbs.c
dbsc/src/skills_dbs.c · 376.1 KB
From the archive dbsc.tgz
Download the archive « Back to the archive contents
#include <sys/types.h>
#include <ctype.h>
#include <math.h>
#include <stdio.h>
#include <string.h>
#include <time.h>
#include "mud.h"
extern bool removeGenieTrans args ( ( CHAR_DATA *ch ) );
int summon_state;
AREA_DATA * summon_area;
ROOM_INDEX_DATA * summon_room;
/* this is for spirit bomb, if we ever need it some where else
it should probably be moved to new_fun.c -Goku */
int get_npc_rank( CHAR_DATA *ch )
{
if (!IS_NPC(ch))
return get_true_rank(ch);
if (ch->exp < 5000)
return 1;
else if (ch->exp < 100000)
return 2;
else if (ch->exp < 1000000)
return 3;
else if (ch->exp < 10000000)
return 4;
else if (ch->exp < 100000000)
return 5;
else if (ch->exp < 1000000000)
return 6;
else if (ch->exp < 10000000000ULL)
return 7;
else if (ch->exp < 50000000000ULL)
return 8;
else if (ch->exp < 100000000000ULL)
return 9;
else if (ch->exp < 300000000000ULL)
return 10;
else if (ch->exp < 600000000000ULL)
return 11;
else if (ch->exp < 1000000000000ULL)
return 12;
else if (ch->exp >= 1000000000000ULL)
return 13;
return 0;
}
/* For puting people back together */
void reuniteSplitForms(CHAR_DATA *ch)
{
int count = 0;
CHAR_DATA *och;
CHAR_DATA *och_next;
CHAR_DATA *purgeQue[5];
for ( och = first_char; och; och = och_next )
{
och_next = och->next;
if (!IS_NPC(och))
continue;
if ( xIS_SET(och->affected_by, AFF_SPLIT_FORM) && och->master == ch)
{
if (och->in_room != ch->in_room)
{
send_to_char("You must be in the same room as your double.", ch);
return;
}
extract_char( och, TRUE );
xREMOVE_BIT( (ch)->affected_by, AFF_SPLIT_FORM );
act( AT_SKILL, "You and your double merge back into one being.", ch, NULL, NULL, TO_CHAR );
act( AT_SKILL, "$n and $s double merge back into one being.", ch, NULL, NULL, TO_NOTVICT );
return;
}
if ( xIS_SET(och->affected_by, AFF_BIOJR) && och->master == ch)
{
act( AT_BLUE, "$n explodes in a cloud of blue smoke.", och, NULL, NULL, TO_NOTVICT );
extract_char( och, TRUE );
}
if( (xIS_SET(och->affected_by, AFF_TRI_FORM) || xIS_SET(och->affected_by, AFF_MULTI_FORM))
&& och->master == ch)
{
purgeQue[count] = och;
count++;
}
}
if( xIS_SET((ch)->affected_by, AFF_BIOJR) )
{
xREMOVE_BIT( (ch)->affected_by, AFF_BIOJR );
return;
}
if ((xIS_SET(ch->affected_by, AFF_TRI_FORM) && count == 2))
{
if (purgeQue[0]->in_room != ch->in_room || purgeQue[1]->in_room != ch->in_room)
{
send_to_char("You must be in the same room as all your doubles.", ch);
return;
}
else
{
extract_char( purgeQue[0], TRUE );
extract_char( purgeQue[1], TRUE );
xREMOVE_BIT( (ch)->affected_by, AFF_TRI_FORM );
if( is_demon(ch) )
{
act( AT_DGREY, "You banish your minions back to the Shadow Earth realm.", ch, NULL, NULL, TO_CHAR );
act( AT_DGREY, "$n banishes $s minions back to the Shadow Earth realm.", ch, NULL, NULL, TO_NOTVICT );
}
else
{
act( AT_YELLOW, "You and your doubles merge back into one being.", ch, NULL, NULL, TO_CHAR );
act( AT_YELLOW, "$n and $s doubles merge back into one being.", ch, NULL, NULL, TO_NOTVICT );
}
return;
}
}
if (xIS_SET(ch->affected_by, AFF_MULTI_FORM) && count == 3)
{
if (purgeQue[0]->in_room != ch->in_room || purgeQue[1]->in_room != ch->in_room
|| purgeQue[2]->in_room != ch->in_room )
{
send_to_char("You must be in the same room as all your doubles.", ch);
return;
}
else
{
extract_char( purgeQue[0], TRUE );
extract_char( purgeQue[1], TRUE );
extract_char( purgeQue[2], TRUE );
xREMOVE_BIT( (ch)->affected_by, AFF_MULTI_FORM );
act( AT_WHITE, "You and your doubles merge back into one being.", ch, NULL, NULL, TO_CHAR );
act( AT_WHITE, "$n and $s doubles merge back into one being.", ch, NULL, NULL, TO_NOTVICT );
return;
}
}
send_to_char("Something wierd happened?", ch);
/*bug("reuniteSplitForms: couldn't clean splits normaly, purging all of %s's forms", ch->name);*/
for ( och = first_char; och; och = och_next )
{
och_next = och->next;
if (!IS_NPC(och))
continue;
if( (xIS_SET(och->affected_by, AFF_SPLIT_FORM)
|| xIS_SET(och->affected_by, AFF_TRI_FORM)
|| xIS_SET(och->affected_by, AFF_MULTI_FORM)
|| xIS_SET(och->affected_by, AFF_BIOJR))
&& och->master == ch)
{
extract_char( och, TRUE );
}
}
xREMOVE_BIT( (ch)->affected_by, AFF_BIOJR );
xREMOVE_BIT( (ch)->affected_by, AFF_MULTI_FORM );
xREMOVE_BIT( (ch)->affected_by, AFF_TRI_FORM );
xREMOVE_BIT( (ch)->affected_by, AFF_SPLIT_FORM );
return;
}
/* Copy player stats to a mob for split, tri, and multi form */
void statsToMob(CHAR_DATA *ch, CHAR_DATA *victim, sh_int form_gsn, bool botched, sh_int amount, sh_int num)
{
char buf [MAX_STRING_LENGTH];
float botchMod = 0;
if( is_demon(ch) ) /* For the minions command */
{
sprintf( buf, "minion%s%d", ch->name, num );
STRFREE( victim->name );
victim->name = STRALLOC( buf );
STRFREE( victim->short_descr );
victim->short_descr = STRALLOC( "Demon Minion" );
}
else if( form_gsn == gsn_clone ) /* For the bio clone skill */
{
sprintf( buf, "clone%s%d", ch->name, num );
STRFREE( victim->name );
victim->name = STRALLOC( buf );
STRFREE( victim->short_descr );
sprintf( buf, "%s Jr", ch->name );
victim->short_descr = STRALLOC( buf );
}
else /* Split, Tri, and Multi form */
{
sprintf( buf, "split%s%d", ch->name, num );
STRFREE( victim->name );
victim->name = STRALLOC( buf );
STRFREE( victim->short_descr );
victim->short_descr = STRALLOC( ch->name );
}
if (xIS_SET(ch->affected_by, AFF_SNAMEK))
xSET_BIT(victim->affected_by, AFF_SNAMEK);
if (xIS_SET(ch->affected_by, AFF_HYPER))
xSET_BIT(victim->affected_by, AFF_HYPER);
if (xIS_SET(ch->affected_by, AFF_GROWTH))
xSET_BIT(victim->affected_by, AFF_GROWTH);
if (xIS_SET(ch->affected_by, AFF_GIANT))
xSET_BIT(victim->affected_by, AFF_GIANT);
if (xIS_SET(ch->affected_by, AFF_KAIOKEN))
xSET_BIT(victim->affected_by, AFF_KAIOKEN);
if (xIS_SET(ch->affected_by, AFF_SSJ))
xSET_BIT(victim->affected_by, AFF_SSJ);
if (xIS_SET(ch->affected_by, AFF_SSJ2))
xSET_BIT(victim->affected_by, AFF_SSJ2);
if (xIS_SET(ch->affected_by, AFF_SSJ3))
xSET_BIT(victim->affected_by, AFF_SSJ3);
if (xIS_SET(ch->affected_by, AFF_SSJ4))
xSET_BIT(victim->affected_by, AFF_SSJ4);
if (xIS_SET(ch->affected_by, AFF_DEAD))
xSET_BIT(victim->affected_by, AFF_DEAD);
if (xIS_SET(ch->affected_by, AFF_USSJ))
xSET_BIT(victim->affected_by, AFF_USSJ);
if (xIS_SET(ch->affected_by, AFF_USSJ2))
xSET_BIT(victim->affected_by, AFF_USSJ2);
if (xIS_SET(ch->affected_by, AFF_FLYING))
xSET_BIT(victim->affected_by, AFF_FLYING);
if (xIS_SET(ch->affected_by, AFF_SEMIPERFECT))
xSET_BIT(victim->affected_by, AFF_SEMIPERFECT);
if (xIS_SET(ch->affected_by, AFF_PERFECT))
xSET_BIT(victim->affected_by, AFF_PERFECT);
if (xIS_SET(ch->affected_by, AFF_ULTRAPERFECT))
xSET_BIT(victim->affected_by, AFF_ULTRAPERFECT);
if (xIS_SET(ch->affected_by, AFF_EXTREME))
xSET_BIT(victim->affected_by, AFF_EXTREME);
if (xIS_SET(ch->affected_by, AFF_MYSTIC))
xSET_BIT(victim->affected_by, AFF_MYSTIC);
if (xIS_SET(ch->affected_by, AFF_EVILBOOST))
xSET_BIT(victim->affected_by, AFF_EVILBOOST);
if (xIS_SET(ch->affected_by, AFF_EVILSURGE))
xSET_BIT(victim->affected_by, AFF_EVILSURGE);
if (xIS_SET(ch->affected_by, AFF_EVILOVERLOAD))
xSET_BIT(victim->affected_by, AFF_EVILOVERLOAD);
if (!botched)
{
sprintf( buf, "%s is standing here.\n\r", victim->short_descr );
STRFREE( victim->long_descr );
victim->long_descr = STRALLOC( buf );
victim->perm_str = get_curr_str(ch);
victim->perm_dex = get_curr_dex(ch);
victim->perm_int = get_curr_int(ch);
victim->perm_con = get_curr_con(ch);
victim->perm_lck = get_curr_lck(ch);
victim->sex = ch->sex;
/*victim->exp = ch->pl;*/
victim->alignment = ch->alignment;
if (form_gsn == gsn_split_form)
{
victim->exp = (ch->exp * 0.75);
victim->pl = (ch->pl * 0.75);
victim->hit = 20;
victim->max_hit = 20;
victim->mana = ch->mana/2;
victim->max_mana = ch->max_mana/2;
}
else if (form_gsn == gsn_tri_form)
{
victim->exp = (ch->exp / 2);
victim->pl = (ch->pl / 2);
victim->hit = 20;
victim->max_hit = 20;
victim->mana = ch->mana/2;
victim->max_mana = ch->max_mana/2;
}
else if (form_gsn == gsn_multi_form)
{
victim->exp = (ch->exp / 4);
victim->pl = (ch->pl / 4);
victim->hit = 20;
victim->max_hit = 20;
victim->mana = ch->mana/2;
victim->max_mana = ch->max_mana/2;
}
else if (form_gsn == gsn_clone)
{
if( amount < 5 )
amount = 5;
if( amount > 10 )
amount = 10;
victim->exp = (ch->exp / amount);
victim->pl = (ch->pl / amount);
victim->hit = 20;
victim->max_hit = 20;
victim->mana = ch->mana/2;
victim->max_mana = ch->max_mana/2;
}
}
else
{
sprintf( buf, "%sSomething doesn't look right with this creature.\n\r", victim->description);
STRFREE( victim->description );
victim->description = STRALLOC( buf );
sprintf( buf, "%s is standing here.\n\r", victim->short_descr );
STRFREE( victim->long_descr );
victim->long_descr = STRALLOC( buf );
botchMod = (float)number_range(ch->pcdata->learned[form_gsn]/2, ch->pcdata->learned[form_gsn])/100;
victim->perm_str = UMAX(1, botchMod * get_curr_str(ch));
victim->perm_dex = UMAX(1, botchMod * get_curr_dex(ch));
victim->perm_int = UMAX(1, botchMod * get_curr_int(ch));
victim->perm_con = UMAX(1, botchMod * get_curr_con(ch));
victim->perm_lck = UMAX(1, botchMod * get_curr_lck(ch));
victim->sex = ch->sex;
/*victim->exp = UMAX(1, botchMod * ch->pl);*/
victim->alignment = ch->alignment;
if (form_gsn == gsn_split_form)
{
victim->exp = UMAX(1, botchMod * (ch->exp * 0.75 ));
victim->pl = UMAX(1, botchMod * (ch->pl * 0.75 ));
victim->hit = URANGE(1, botchMod * 20, 20);
victim->max_hit = URANGE(1, botchMod * 20, 20);
victim->mana = UMAX(1, botchMod * (ch->mana/2));
victim->max_mana = UMAX(1, botchMod * (ch->max_mana/2));
}
else if (form_gsn == gsn_tri_form)
{
victim->exp = UMAX(1, botchMod * (ch->exp / 2));
victim->pl = UMAX(1, botchMod * (ch->pl / 2));
victim->hit = URANGE(1, botchMod * 20, 20);
victim->max_hit = URANGE(1, botchMod * 20, 20);
victim->mana = UMAX(1, botchMod * (ch->mana/2));
victim->max_mana = UMAX(1, botchMod * (ch->max_mana/2));
}
else if (form_gsn == gsn_multi_form)
{
victim->exp = UMAX(1, botchMod * (ch->exp / 4));
victim->pl = UMAX(1, botchMod * (ch->pl / 4));
victim->hit = URANGE(1, botchMod * 20, 20);
victim->max_hit = URANGE(1, botchMod * 20, 20);
victim->mana = UMAX(1, botchMod * (ch->mana/2));
victim->max_mana = UMAX(1, botchMod * (ch->max_mana/2));
}
else if (form_gsn == gsn_clone)
{
victim->exp = UMAX(1, botchMod * (ch->exp / amount));
victim->pl = UMAX(1, botchMod * (ch->pl / amount));
victim->hit = URANGE(1, botchMod * 20, 20);
victim->max_hit = URANGE(1, botchMod * 20, 20);
victim->mana = UMAX(1, botchMod * (ch->mana/2));
victim->max_mana = UMAX(1, botchMod * (ch->max_mana/2));
}
}
return;
}
/* Remove the stats placed on players from racial transformations */
void transStatRemove(CHAR_DATA *ch)
{
AFFECT_DATA *tAff;
AFFECT_DATA *tAffNext;
if ( !ch->first_affect )
return;
for (tAff = ch->first_affect;tAff;tAff = tAffNext)
{
tAffNext = tAff->next;
if (tAff->affLocator == LOC_TRANS_STAT_APPLY)
affect_remove(ch, tAff);
}
return;
}
/* Apply stats to characters who use racial transformations */
void transStatApply(CHAR_DATA *ch, int strMod, int spdMod, int intMod, int conMod)
{
AFFECT_DATA affStr;
AFFECT_DATA affSpd;
AFFECT_DATA affInt;
AFFECT_DATA affCon;
transStatRemove(ch);
if (strMod)
{
affStr.type = -1;
affStr.duration = -1;
affStr.location = APPLY_STR;
affStr.modifier = strMod;
xCLEAR_BITS(affStr.bitvector);
affStr.affLocator = LOC_TRANS_STAT_APPLY;
affect_to_char(ch, &affStr);
}
if (spdMod)
{
affSpd.type = -1;
affSpd.duration = -1;
affSpd.location = APPLY_DEX;
affSpd.modifier = spdMod;
xCLEAR_BITS(affSpd.bitvector);
affSpd.affLocator = LOC_TRANS_STAT_APPLY;
affect_to_char(ch, &affSpd);
}
if (intMod)
{
affInt.type = -1;
affInt.duration = -1;
affInt.location = APPLY_INT;
affInt.modifier = intMod;
xCLEAR_BITS(affInt.bitvector);
affInt.affLocator = LOC_TRANS_STAT_APPLY;
affect_to_char(ch, &affInt);
}
if (conMod)
{
affCon.type = -1;
affCon.duration = -1;
affCon.location = APPLY_CON;
affCon.modifier = conMod;
xCLEAR_BITS(affCon.bitvector);
affCon.affLocator = LOC_TRANS_STAT_APPLY;
affect_to_char(ch, &affCon);
}
return;
}
void rage( CHAR_DATA *ch, CHAR_DATA *victim )
{
if( !ch->desc )
return;
if( !victim )
return;
if( IS_NPC(ch) )
return;
if( !ch->in_room )
return;
if( !victim->in_room )
return;
if ( ch->pcdata->learned[gsn_ssj] > 0 )
return;
if (ch->delay <= 0)
{
if (!is_saiyan(ch) && !is_hb(ch))
return;
if (ch->rage < 500 || ch->exp < 8000000)
return;
if ( ch->pcdata->learned[gsn_ssj] > 0 )
return;
switch (number_range(1,5))
{
default:
case 1:
case 2:
case 3:
case 4:
break;
case 5:
if (number_percent() > ((ch->rage - 400) / 50))
{
switch (number_range(1, 10))
{
default:
break;
case 1:
act( AT_BLUE, "Your hair flashes blonde, but quickly returns to normal.", ch, NULL, victim, TO_CHAR );
act( AT_BLUE, "$n's hair flashes blonde, but quickly returns to normal.", ch, NULL, victim, TO_VICT );
act( AT_BLUE, "$n's hair flashes blonde, but quickly returns to normal.", ch, NULL, victim, TO_NOTVICT );
break;
case 2:
act( AT_BLUE, "You scream out, in pure rage, your hatred for $N.", ch, NULL, victim, TO_CHAR );
act( AT_BLUE, "$n screams out, in pure rage, $s hatred for you.", ch, NULL, victim, TO_VICT );
act( AT_BLUE, "$n screams out, in pure rage, $s hatred for $N.", ch, NULL, victim, TO_NOTVICT );
break;
case 3:
break;
case 4:
break;
case 5:
break;
case 6:
break;
case 7:
break;
case 8:
break;
case 9:
break;
case 10:
break;
}
return;
}
ch->delay_vict = victim;
ch->delay = 6;
break;
}
}
switch (ch->delay)
{
case 6:
act( AT_YELLOW, "=-", ch, NULL, victim, TO_CHAR );
act( AT_YELLOW, "=-", ch, NULL, victim, TO_VICT );
act( AT_YELLOW, "=-", ch, NULL, victim, TO_NOTVICT );
act( AT_RED, "You scream out, in pure rage, your hatred for $N.", ch, NULL, victim, TO_CHAR );
act( AT_RED, "$n screams out, in pure rage, $s hatred for you.", ch, NULL, victim, TO_VICT );
act( AT_RED, "$n screams out, in pure rage, $s hatred for $N.", ch, NULL, victim, TO_NOTVICT );
act( AT_YELLOW, "=-", ch, NULL, victim, TO_CHAR );
act( AT_YELLOW, "=-", ch, NULL, victim, TO_VICT );
act( AT_YELLOW, "=-", ch, NULL, victim, TO_NOTVICT );
ch->delay -= 1;
add_timer( ch, TIMER_DELAY, 4, NULL, 1 );
add_timer( victim, TIMER_ASUPRESSED, 4, NULL, 1 );
break;
case 5:
act( AT_RED, "=-", ch, NULL, victim, TO_CHAR );
act( AT_RED, "=-", ch, NULL, victim, TO_VICT );
act( AT_RED, "=-", ch, NULL, victim, TO_NOTVICT );
act( AT_YELLOW, "Your hair flashes blonde, but quickly returns to normal.", ch, NULL, victim, TO_CHAR );
act( AT_YELLOW, "$n's hair flashes blonde, but quickly returns to normal.", ch, NULL, victim, TO_VICT );
act( AT_YELLOW, "$n's hair flashes blonde, but quickly returns to normal.", ch, NULL, victim, TO_NOTVICT );
act( AT_RED, "=-", ch, NULL, victim, TO_CHAR );
act( AT_RED, "=-", ch, NULL, victim, TO_VICT );
act( AT_RED, "=-", ch, NULL, victim, TO_NOTVICT );
ch->delay -= 1;
add_timer( ch, TIMER_DELAY, 4, NULL, 1 );
add_timer( victim, TIMER_ASUPRESSED, 4, NULL, 1 );
break;
case 4:
act( AT_YELLOW, "=-", ch, NULL, victim, TO_CHAR );
act( AT_YELLOW, "=-", ch, NULL, victim, TO_VICT );
act( AT_YELLOW, "=-", ch, NULL, victim, TO_NOTVICT );
act( AT_RED, "Your hair flashes blonde, but quickly returns to normal.", ch, NULL, victim, TO_CHAR );
act( AT_RED, "$n's hair flashes blonde, but quickly returns to normal.", ch, NULL, victim, TO_VICT );
act( AT_RED, "$n's hair flashes blonde, but quickly returns to normal.", ch, NULL, victim, TO_NOTVICT );
act( AT_YELLOW, "=-", ch, NULL, victim, TO_CHAR );
act( AT_YELLOW, "=-", ch, NULL, victim, TO_VICT );
act( AT_YELLOW, "=-", ch, NULL, victim, TO_NOTVICT );
ch->delay -= 1;
add_timer( ch, TIMER_DELAY, 4, NULL, 1 );
add_timer( victim, TIMER_ASUPRESSED, 4, NULL, 1 );
break;
case 3:
act( AT_RED, "=-", ch, NULL, victim, TO_CHAR );
act( AT_RED, "=-", ch, NULL, victim, TO_VICT );
act( AT_RED, "=-", ch, NULL, victim, TO_NOTVICT );
act( AT_YELLOW, "Your hair flashes blonde, but slowly fades back to normal.", ch, NULL, victim, TO_CHAR );
act( AT_YELLOW, "$n's hair flashes blonde, but slowly fades back to normal.", ch, NULL, victim, TO_VICT );
act( AT_YELLOW, "$n's hair flashes blonde, but slowly fades back to normal.", ch, NULL, victim, TO_NOTVICT );
act( AT_RED, "=-", ch, NULL, victim, TO_CHAR );
act( AT_RED, "=-", ch, NULL, victim, TO_VICT );
act( AT_RED, "=-", ch, NULL, victim, TO_NOTVICT );
ch->delay -= 1;
add_timer( ch, TIMER_DELAY, 4, NULL, 1 );
add_timer( victim, TIMER_ASUPRESSED, 4, NULL, 1 );
break;
case 2:
act( AT_YELLOW, "=-", ch, NULL, victim, TO_CHAR );
act( AT_YELLOW, "=-", ch, NULL, victim, TO_VICT );
act( AT_YELLOW, "=-", ch, NULL, victim, TO_NOTVICT );
act( AT_RED, "Your voice bellows out through the area, with a deep angry howl.", ch, NULL, victim, TO_CHAR );
act( AT_RED, "$n's voice bellows out through the area, with a deep angry howl.", ch, NULL, victim, TO_VICT );
act( AT_RED, "$n's voice bellows out through the area, with a deep angry howl.", ch, NULL, victim, TO_NOTVICT );
do_yell( ch, "rrrrrRRRRRRRRAAAAAAAAAAAAHHHHHHHHHH!!!");
act( AT_YELLOW, "=-", ch, NULL, victim, TO_CHAR );
act( AT_YELLOW, "=-", ch, NULL, victim, TO_VICT );
act( AT_YELLOW, "=-", ch, NULL, victim, TO_NOTVICT );
ch->delay -= 1;
add_timer( ch, TIMER_DELAY, 4, NULL, 1 );
add_timer( victim, TIMER_ASUPRESSED, 4, NULL, 1 );
break;
case 1:
act( AT_RED, "=-", ch, NULL, victim, TO_CHAR );
act( AT_RED, "=-", ch, NULL, victim, TO_VICT );
act( AT_RED, "=-", ch, NULL, victim, TO_NOTVICT );
act( AT_YELLOW, "Your hair flashes blonde and your eyes turn blue as a fiery aura erupts around you.", ch, NULL, victim, TO_CHAR );
act( AT_YELLOW, "You look up at $N, with rage filled eyes, ready to kill...", ch, NULL, victim, TO_CHAR );
act( AT_YELLOW, "$n's hair flashes blonde and $s eyes turn blue as a fiery aura erupts around $m.", ch, NULL, victim, TO_VICT );
act( AT_YELLOW, "$n looks up at you, with rage filled eyes, ready to kill...", ch, NULL, victim, TO_VICT );
act( AT_YELLOW, "$n's hair flashes blonde and $s eyes turn blue as a fiery aura erupts around $m.", ch, NULL, victim, TO_NOTVICT );
act( AT_YELLOW, "$n looks up at $N, with rage filled eyes, ready to kill...", ch, NULL, victim, TO_NOTVICT );
act( AT_RED, "=-", ch, NULL, victim, TO_CHAR );
act( AT_RED, "=-", ch, NULL, victim, TO_VICT );
act( AT_RED, "=-", ch, NULL, victim, TO_NOTVICT );
ch->pcdata->learned[gsn_ssj] = 10;
if (xIS_SET((ch)->affected_by, AFF_KAIOKEN))
xREMOVE_BIT((ch)->affected_by, AFF_KAIOKEN);
if (xIS_SET((ch)->affected_by, AFF_OOZARU))
xREMOVE_BIT((ch)->affected_by, AFF_OOZARU);
xSET_BIT( (ch)->affected_by, AFF_SSJ );
ch->pl = ch->exp * 10;
transStatApply(ch, 10, 5, 3, 5);
ch->rage = 0;
ch->delay = 0;
add_timer( ch, TIMER_ASUPRESSED, 6, NULL, 1 );
add_timer( victim, TIMER_ASUPRESSED, 6, NULL, 1 );
break;
}
return;
}
void rage2( CHAR_DATA *ch, CHAR_DATA *victim )
{
if( !ch->desc )
return;
if( !victim )
return;
if( IS_NPC(ch) )
return;
if( !ch->in_room )
return;
if( !victim->in_room )
return;
if ( ch->pcdata->learned[gsn_ssj2] > 0 && ch->pcdata->learned[gsn_ssj] <= 0)
return;
if (!xIS_SET(ch->affected_by, AFF_SSJ))
return;
if (ch->delay <= 0)
{
if (!is_saiyan(ch) && !is_hb(ch))
return;
if (ch->rage < 800 || ch->exp < 50000000)
return;
if ( ch->pcdata->learned[gsn_ssj2] > 0 )
return;
switch (number_range(1,5))
{
default:
case 1:
case 2:
case 3:
case 4:
break;
case 5:
if (number_percent() > ((ch->rage - 800) / 50))
{
switch (number_range(1, 10))
{
default:
break;
case 1:
act( AT_BLUE, "Electricity begins arcing around your body, but it quickly disappears.", ch, NULL, victim, TO_CHAR );
act( AT_BLUE, "Electricity begins arcing around $n's body, but it quickly disappears.", ch, NULL, victim, TO_VICT );
act( AT_BLUE, "Electricity begins arcing around $n's body, but it quickly disappears.", ch, NULL, victim, TO_NOTVICT );
break;
case 2:
act( AT_BLUE, "You scream out, in pure rage, your hatred for $N.", ch, NULL, victim, TO_CHAR );
act( AT_BLUE, "$n screams out, in pure rage, $s hatred for you.", ch, NULL, victim, TO_VICT );
act( AT_BLUE, "$n screams out, in pure rage, $s hatred for $N.", ch, NULL, victim, TO_NOTVICT );
break;
case 3:
break;
case 4:
break;
case 5:
break;
case 6:
break;
case 7:
break;
case 8:
break;
case 9:
break;
case 10:
break;
}
return;
}
ch->delay_vict = victim;
ch->delay = 6;
break;
}
}
switch (ch->delay)
{
case 6:
act( AT_YELLOW, "=-", ch, NULL, victim, TO_CHAR );
act( AT_YELLOW, "=-", ch, NULL, victim, TO_VICT );
act( AT_YELLOW, "=-", ch, NULL, victim, TO_NOTVICT );
act( AT_RED, "You scream out, in pure rage, your hatred for $N.", ch, NULL, victim, TO_CHAR );
act( AT_RED, "$n screams out, in pure rage, $s hatred for you.", ch, NULL, victim, TO_VICT );
act( AT_RED, "$n screams out, in pure rage, $s hatred for $N.", ch, NULL, victim, TO_NOTVICT );
act( AT_YELLOW, "=-", ch, NULL, victim, TO_CHAR );
act( AT_YELLOW, "=-", ch, NULL, victim, TO_VICT );
act( AT_YELLOW, "=-", ch, NULL, victim, TO_NOTVICT );
ch->delay -= 1;
add_timer( ch, TIMER_DELAY, 4, NULL, 1 );
add_timer( victim, TIMER_ASUPRESSED, 4, NULL, 1 );
break;
case 5:
act( AT_RED, "=-", ch, NULL, victim, TO_CHAR );
act( AT_RED, "=-", ch, NULL, victim, TO_VICT );
act( AT_RED, "=-", ch, NULL, victim, TO_NOTVICT );
act( AT_YELLOW, "Electricity begins arcing around your body.", ch, NULL, victim, TO_CHAR );
act( AT_YELLOW, "Electricity begins arcing around $n's body.", ch, NULL, victim, TO_VICT );
act( AT_YELLOW, "Electricity begins arcing around $n's body.", ch, NULL, victim, TO_NOTVICT );
act( AT_RED, "=-", ch, NULL, victim, TO_CHAR );
act( AT_RED, "=-", ch, NULL, victim, TO_VICT );
act( AT_RED, "=-", ch, NULL, victim, TO_NOTVICT );
ch->delay -= 1;
add_timer( ch, TIMER_DELAY, 4, NULL, 1 );
add_timer( victim, TIMER_ASUPRESSED, 4, NULL, 1 );
break;
case 4:
act( AT_YELLOW, "=-", ch, NULL, victim, TO_CHAR );
act( AT_YELLOW, "=-", ch, NULL, victim, TO_VICT );
act( AT_YELLOW, "=-", ch, NULL, victim, TO_NOTVICT );
act( AT_RED, "Electricity violently arcs around your body.", ch, NULL, victim, TO_CHAR );
act( AT_RED, "Electricity violently arcs around $n's body.", ch, NULL, victim, TO_VICT );
act( AT_RED, "Electricity violently arcs around $n's body.", ch, NULL, victim, TO_NOTVICT );
act( AT_YELLOW, "=-", ch, NULL, victim, TO_CHAR );
act( AT_YELLOW, "=-", ch, NULL, victim, TO_VICT );
act( AT_YELLOW, "=-", ch, NULL, victim, TO_NOTVICT );
ch->delay -= 1;
add_timer( ch, TIMER_DELAY, 4, NULL, 1 );
add_timer( victim, TIMER_ASUPRESSED, 4, NULL, 1 );
break;
case 3:
act( AT_RED, "=-", ch, NULL, victim, TO_CHAR );
act( AT_RED, "=-", ch, NULL, victim, TO_VICT );
act( AT_RED, "=-", ch, NULL, victim, TO_NOTVICT );
act( AT_YELLOW, "Your hair flies back and begins to stand straight up.", ch, NULL, victim, TO_CHAR );
act( AT_YELLOW, "$n's hair flies back and begins to stand straight up.", ch, NULL, victim, TO_VICT );
act( AT_YELLOW, "$n's hair flies back and begins to stand straight up.", ch, NULL, victim, TO_NOTVICT );
act( AT_RED, "=-", ch, NULL, victim, TO_CHAR );
act( AT_RED, "=-", ch, NULL, victim, TO_VICT );
act( AT_RED, "=-", ch, NULL, victim, TO_NOTVICT );
ch->delay -= 1;
add_timer( ch, TIMER_DELAY, 4, NULL, 1 );
add_timer( victim, TIMER_ASUPRESSED, 4, NULL, 1 );
break;
case 2:
act( AT_YELLOW, "=-", ch, NULL, victim, TO_CHAR );
act( AT_YELLOW, "=-", ch, NULL, victim, TO_VICT );
act( AT_YELLOW, "=-", ch, NULL, victim, TO_NOTVICT );
act( AT_RED, "Your voice bellows out through the area, with a deep angry howl.", ch, NULL, victim, TO_CHAR );
act( AT_RED, "$n's voice bellows out through the area, with a deep angry howl.", ch, NULL, victim, TO_VICT );
act( AT_RED, "$n's voice bellows out through the area, with a deep angry howl.", ch, NULL, victim, TO_NOTVICT );
do_yell( ch, "rrrrrRRRRRRRRAAAAAAAAAAAAHHHHHHHHHH!!!");
act( AT_YELLOW, "=-", ch, NULL, victim, TO_CHAR );
act( AT_YELLOW, "=-", ch, NULL, victim, TO_VICT );
act( AT_YELLOW, "=-", ch, NULL, victim, TO_NOTVICT );
ch->delay -= 1;
add_timer( ch, TIMER_DELAY, 4, NULL, 1 );
add_timer( victim, TIMER_ASUPRESSED, 4, NULL, 1 );
break;
case 1:
act( AT_RED, "=-", ch, NULL, victim, TO_CHAR );
act( AT_RED, "=-", ch, NULL, victim, TO_VICT );
act( AT_RED, "=-", ch, NULL, victim, TO_NOTVICT );
act( AT_YELLOW, "Your hair flies back all the way and electricity arcs all around you as your aura flares brightly.", ch, NULL, victim, TO_CHAR );
act( AT_YELLOW, "$n's hair flies back all the way and electricity arcs all around $m as $s aura flares brightly.", ch, NULL, victim, TO_VICT );
act( AT_YELLOW, "$n's hair flies back all the way and electricity arcs all around $m as $s aura flares brightly", ch, NULL, victim, TO_NOTVICT );
act( AT_RED, "=-", ch, NULL, victim, TO_CHAR );
act( AT_RED, "=-", ch, NULL, victim, TO_VICT );
act( AT_RED, "=-", ch, NULL, victim, TO_NOTVICT );
ch->pcdata->learned[gsn_ssj2] = 10;
if (xIS_SET((ch)->affected_by, AFF_KAIOKEN))
xREMOVE_BIT((ch)->affected_by, AFF_KAIOKEN);
if (xIS_SET((ch)->affected_by, AFF_OOZARU))
xREMOVE_BIT((ch)->affected_by, AFF_OOZARU);
if (!xIS_SET(ch->affected_by, AFF_SSJ))
xSET_BIT( (ch)->affected_by, AFF_SSJ );
xSET_BIT( (ch)->affected_by, AFF_SSJ2 );
ch->pl = ch->exp * 16;
transStatApply(ch, 16, 8, 4, 8);
ch->delay = 0;
ch->rage = 0;
add_timer( ch, TIMER_ASUPRESSED, 6, NULL, 1 );
add_timer( victim, TIMER_ASUPRESSED, 6, NULL, 1 );
break;
}
return;
}
void rage3( CHAR_DATA *ch, CHAR_DATA *victim )
{
if( !ch->desc )
return;
if( !victim )
return;
if( IS_NPC(ch) )
return;
if( !ch->in_room )
return;
if( !victim->in_room )
return;
if ( ch->pcdata->learned[gsn_ssj3] > 0 && ch->pcdata->learned[gsn_ssj] <= 0
&& ch->pcdata->learned[gsn_ssj2] <= 0)
return;
if (!xIS_SET(ch->affected_by, AFF_SSJ) && !xIS_SET(ch->affected_by, AFF_SSJ2))
return;
if (ch->delay <= 0)
{
if (!is_saiyan(ch) && !is_hb(ch))
return;
if (ch->rage < 1000 || ch->exp < 500000000)
return;
if ( ch->pcdata->learned[gsn_ssj3] > 0 )
return;
switch (number_range(1,5))
{
default:
case 1:
case 2:
case 3:
case 4:
break;
case 5:
if (number_percent() > ((ch->rage - 1000) / 50))
{
return;
}
ch->delay_vict = victim;
ch->delay = 6;
break;
}
}
switch (ch->delay)
{
case 6:
act( AT_YELLOW, "=-", ch, NULL, victim, TO_CHAR );
act( AT_YELLOW, "=-", ch, NULL, victim, TO_VICT );
act( AT_YELLOW, "=-", ch, NULL, victim, TO_NOTVICT );
act( AT_RED, "You scream out, in pure rage, your hatred for $N.", ch, NULL, victim, TO_CHAR );
act( AT_RED, "$n screams out, in pure rage, $s hatred for you.", ch, NULL, victim, TO_VICT );
act( AT_RED, "$n screams out, in pure rage, $s hatred for $N.", ch, NULL, victim, TO_NOTVICT );
act( AT_YELLOW, "=-", ch, NULL, victim, TO_CHAR );
act( AT_YELLOW, "=-", ch, NULL, victim, TO_VICT );
act( AT_YELLOW, "=-", ch, NULL, victim, TO_NOTVICT );
ch->delay -= 1;
add_timer( ch, TIMER_DELAY, 4, NULL, 1 );
add_timer( victim, TIMER_ASUPRESSED, 4, NULL, 1 );
break;
case 5:
act( AT_RED, "=-", ch, NULL, victim, TO_CHAR );
act( AT_RED, "=-", ch, NULL, victim, TO_VICT );
act( AT_RED, "=-", ch, NULL, victim, TO_NOTVICT );
act( AT_YELLOW, "Electricity begins arcing around your body.", ch, NULL, victim, TO_CHAR );
act( AT_YELLOW, "Electricity begins arcing around $n's body.", ch, NULL, victim, TO_VICT );
act( AT_YELLOW, "Electricity begins arcing around $n's body.", ch, NULL, victim, TO_NOTVICT );
act( AT_RED, "=-", ch, NULL, victim, TO_CHAR );
act( AT_RED, "=-", ch, NULL, victim, TO_VICT );
act( AT_RED, "=-", ch, NULL, victim, TO_NOTVICT );
ch->delay -= 1;
add_timer( ch, TIMER_DELAY, 4, NULL, 1 );
add_timer( victim, TIMER_ASUPRESSED, 4, NULL, 1 );
break;
case 4:
act( AT_YELLOW, "=-", ch, NULL, victim, TO_CHAR );
act( AT_YELLOW, "=-", ch, NULL, victim, TO_VICT );
act( AT_YELLOW, "=-", ch, NULL, victim, TO_NOTVICT );
act( AT_RED, "Electricity violently arcs around your body.", ch, NULL, victim, TO_CHAR );
act( AT_RED, "Electricity violently arcs around $n's body.", ch, NULL, victim, TO_VICT );
act( AT_RED, "Electricity violently arcs around $n's body.", ch, NULL, victim, TO_NOTVICT );
act( AT_YELLOW, "=-", ch, NULL, victim, TO_CHAR );
act( AT_YELLOW, "=-", ch, NULL, victim, TO_VICT );
act( AT_YELLOW, "=-", ch, NULL, victim, TO_NOTVICT );
ch->delay -= 1;
add_timer( ch, TIMER_DELAY, 4, NULL, 1 );
add_timer( victim, TIMER_ASUPRESSED, 4, NULL, 1 );
break;
case 3:
act( AT_RED, "=-", ch, NULL, victim, TO_CHAR );
act( AT_RED, "=-", ch, NULL, victim, TO_VICT );
act( AT_RED, "=-", ch, NULL, victim, TO_NOTVICT );
act( AT_YELLOW, "Your hair begins to flow all the way down your back.", ch, NULL, victim, TO_CHAR );
act( AT_YELLOW, "$n's hair begins to flow all the way down $s back.", ch, NULL, victim, TO_VICT );
act( AT_YELLOW, "$n's hair begins to flow all the way down $s back.", ch, NULL, victim, TO_NOTVICT );
act( AT_RED, "=-", ch, NULL, victim, TO_CHAR );
act( AT_RED, "=-", ch, NULL, victim, TO_VICT );
act( AT_RED, "=-", ch, NULL, victim, TO_NOTVICT );
ch->delay -= 1;
add_timer( ch, TIMER_DELAY, 4, NULL, 1 );
add_timer( victim, TIMER_ASUPRESSED, 4, NULL, 1 );
break;
case 2:
act( AT_YELLOW, "=-", ch, NULL, victim, TO_CHAR );
act( AT_YELLOW, "=-", ch, NULL, victim, TO_VICT );
act( AT_YELLOW, "=-", ch, NULL, victim, TO_NOTVICT );
act( AT_RED, "Your voice bellows out through the area, with a deep angry howl.", ch, NULL, victim, TO_CHAR );
act( AT_RED, "$n's voice bellows out through the area, with a deep angry howl.", ch, NULL, victim, TO_VICT );
act( AT_RED, "$n's voice bellows out through the area, with a deep angry howl.", ch, NULL, victim, TO_NOTVICT );
do_yell( ch, "rrrrrRRRRRRRRAAAAAAAAAAAAHHHHHHHHHH!!!");
act( AT_YELLOW, "=-", ch, NULL, victim, TO_CHAR );
act( AT_YELLOW, "=-", ch, NULL, victim, TO_VICT );
act( AT_YELLOW, "=-", ch, NULL, victim, TO_NOTVICT );
ch->delay -= 1;
add_timer( ch, TIMER_DELAY, 4, NULL, 1 );
add_timer( victim, TIMER_ASUPRESSED, 4, NULL, 1 );
break;
case 1:
act( AT_RED, "=-", ch, NULL, victim, TO_CHAR );
act( AT_RED, "=-", ch, NULL, victim, TO_VICT );
act( AT_RED, "=-", ch, NULL, victim, TO_NOTVICT );
act( AT_YELLOW, "Your eyebrows disappear and your aura flares even brighter.", ch, NULL, victim, TO_CHAR );
act( AT_YELLOW, "$n's eyebrows disappear and $s aura flares even brighter.", ch, NULL, victim, TO_VICT );
act( AT_YELLOW, "$n's eyebrows disappear and $s aura flares even brighter.", ch, NULL, victim, TO_NOTVICT );
act( AT_RED, "=-", ch, NULL, victim, TO_CHAR );
act( AT_RED, "=-", ch, NULL, victim, TO_VICT );
act( AT_RED, "=-", ch, NULL, victim, TO_NOTVICT );
ch->pcdata->learned[gsn_ssj3] = 10;
if (xIS_SET((ch)->affected_by, AFF_KAIOKEN))
xREMOVE_BIT((ch)->affected_by, AFF_KAIOKEN);
if (xIS_SET((ch)->affected_by, AFF_OOZARU))
xREMOVE_BIT((ch)->affected_by, AFF_OOZARU);
if (!xIS_SET(ch->affected_by, AFF_SSJ))
xSET_BIT( (ch)->affected_by, AFF_SSJ );
if (!xIS_SET(ch->affected_by, AFF_SSJ2))
xSET_BIT( (ch)->affected_by, AFF_SSJ2 );
xSET_BIT( (ch)->affected_by, AFF_SSJ3 );
ch->pl = ch->exp * 24;
transStatApply(ch, 24, 12, 6, 12);
ch->delay = 0;
ch->rage = 0;
add_timer( ch, TIMER_ASUPRESSED, 6, NULL, 1 );
add_timer( victim, TIMER_ASUPRESSED, 6, NULL, 1 );
break;
}
return;
}
void rage4( CHAR_DATA *ch, CHAR_DATA *victim )
{
if( !ch->desc )
return;
if( !victim )
return;
if( IS_NPC(ch) )
return;
if( !ch->in_room )
return;
if( !victim->in_room )
return;
if ( ch->pcdata->learned[gsn_ssj4] > 0 && ch->pcdata->learned[gsn_ssj] <= 0
&& ch->pcdata->learned[gsn_ssj2] <= 0 && ch->pcdata->learned[gsn_ssj3] <= 0)
return;
if( !xIS_SET(ch->affected_by, AFF_GOLDEN_OOZARU) )
return;
/*
if (!xIS_SET(ch->affected_by, AFF_SSJ) && !xIS_SET(ch->affected_by, AFF_SSJ2)
&& !xIS_SET(ch->affected_by, AFF_SSJ3))
return;
*/
if (ch->delay <= 0)
{
if (!is_saiyan(ch))
return;
if (ch->rage < 1500 || ch->exp < 2000000000)
return;
if ( ch->pcdata->learned[gsn_ssj4] > 0 )
return;
switch (number_range(1,5))
{
default:
case 1:
case 2:
case 3:
case 4:
break;
case 5:
if (number_percent() > ((ch->rage - 1500) / 50))
{
return;
}
ch->delay_vict = victim;
ch->delay = 6;
break;
}
}
switch (ch->delay)
{
case 6:
act( AT_YELLOW, "=-", ch, NULL, victim, TO_CHAR );
act( AT_YELLOW, "=-", ch, NULL, victim, TO_VICT );
act( AT_YELLOW, "=-", ch, NULL, victim, TO_NOTVICT );
act( AT_RED, "You scream out, in pure rage, your hatred for $N.", ch, NULL, victim, TO_CHAR );
act( AT_RED, "$n screams out, in pure rage, $s hatred for you.", ch, NULL, victim, TO_VICT );
act( AT_RED, "$n screams out, in pure rage, $s hatred for $N.", ch, NULL, victim, TO_NOTVICT );
act( AT_YELLOW, "=-", ch, NULL, victim, TO_CHAR );
act( AT_YELLOW, "=-", ch, NULL, victim, TO_VICT );
act( AT_YELLOW, "=-", ch, NULL, victim, TO_NOTVICT );
ch->delay -= 1;
add_timer( ch, TIMER_DELAY, 4, NULL, 1 );
add_timer( victim, TIMER_ASUPRESSED, 4, NULL, 1 );
break;
case 5:
act( AT_YELLOW, "=-", ch, NULL, victim, TO_CHAR );
act( AT_YELLOW, "=-", ch, NULL, victim, TO_VICT );
act( AT_YELLOW, "=-", ch, NULL, victim, TO_NOTVICT );
act( AT_RED, "Electricity violently arcs around your body.", ch, NULL, victim, TO_CHAR );
act( AT_RED, "Electricity violently arcs around $n's body.", ch, NULL, victim, TO_VICT );
act( AT_RED, "Electricity violently arcs around $n's body.", ch, NULL, victim, TO_NOTVICT );
act( AT_YELLOW, "=-", ch, NULL, victim, TO_CHAR );
act( AT_YELLOW, "=-", ch, NULL, victim, TO_VICT );
act( AT_YELLOW, "=-", ch, NULL, victim, TO_NOTVICT );
ch->delay -= 1;
add_timer( ch, TIMER_DELAY, 4, NULL, 1 );
add_timer( victim, TIMER_ASUPRESSED, 4, NULL, 1 );
break;
case 4:
act( AT_YELLOW, "=-", ch, NULL, victim, TO_CHAR );
act( AT_YELLOW, "=-", ch, NULL, victim, TO_VICT );
act( AT_YELLOW, "=-", ch, NULL, victim, TO_NOTVICT );
act( AT_RED, "Red fur begins to sprout all over your body.", ch, NULL, victim, TO_CHAR );
act( AT_RED, "Red fur begins to sprout all over $n's body.", ch, NULL, victim, TO_VICT );
act( AT_RED, "Red fur begins to sprout all over $n's body.", ch, NULL, victim, TO_NOTVICT );
act( AT_YELLOW, "=-", ch, NULL, victim, TO_CHAR );
act( AT_YELLOW, "=-", ch, NULL, victim, TO_VICT );
act( AT_YELLOW, "=-", ch, NULL, victim, TO_NOTVICT );
ch->delay -= 1;
add_timer( ch, TIMER_DELAY, 4, NULL, 1 );
add_timer( victim, TIMER_ASUPRESSED, 4, NULL, 1 );
break;
case 3:
act( AT_RED, "=-", ch, NULL, victim, TO_CHAR );
act( AT_RED, "=-", ch, NULL, victim, TO_VICT );
act( AT_RED, "=-", ch, NULL, victim, TO_NOTVICT );
act( AT_YELLOW, "Your hair flashes black.", ch, NULL, victim, TO_CHAR );
act( AT_YELLOW, "$n's hair flashes black.", ch, NULL, victim, TO_VICT );
act( AT_YELLOW, "$n's hair flashes black.", ch, NULL, victim, TO_NOTVICT );
act( AT_RED, "=-", ch, NULL, victim, TO_CHAR );
act( AT_RED, "=-", ch, NULL, victim, TO_VICT );
act( AT_RED, "=-", ch, NULL, victim, TO_NOTVICT );
ch->delay -= 1;
add_timer( ch, TIMER_DELAY, 4, NULL, 1 );
add_timer( victim, TIMER_ASUPRESSED, 4, NULL, 1 );
break;
case 2:
act( AT_YELLOW, "=-", ch, NULL, victim, TO_CHAR );
act( AT_YELLOW, "=-", ch, NULL, victim, TO_VICT );
act( AT_YELLOW, "=-", ch, NULL, victim, TO_NOTVICT );
act( AT_RED, "Your voice bellows out through the area, with a deep angry howl.", ch, NULL, victim, TO_CHAR );
act( AT_RED, "$n's voice bellows out through the area, with a deep angry howl.", ch, NULL, victim, TO_VICT );
act( AT_RED, "$n's voice bellows out through the area, with a deep angry howl.", ch, NULL, victim, TO_NOTVICT );
do_yell( ch, "rrrrrRRRRRRRRAAAAAAAAAAAAHHHHHHHHHH!!!");
act( AT_YELLOW, "=-", ch, NULL, victim, TO_CHAR );
act( AT_YELLOW, "=-", ch, NULL, victim, TO_VICT );
act( AT_YELLOW, "=-", ch, NULL, victim, TO_NOTVICT );
ch->delay -= 1;
add_timer( ch, TIMER_DELAY, 4, NULL, 1 );
add_timer( victim, TIMER_ASUPRESSED, 4, NULL, 1 );
break;
case 1:
act( AT_RED, "=-", ch, NULL, victim, TO_CHAR );
act( AT_RED, "=-", ch, NULL, victim, TO_VICT );
act( AT_RED, "=-", ch, NULL, victim, TO_NOTVICT );
act( AT_RED, "You howl with anger as your hair turns black again and grow", ch, NULL, NULL, TO_CHAR );
act( AT_RED, "thick red fur all over your body, finally you sprout a", ch, NULL, NULL, TO_CHAR );
act( AT_RED, "tail and look up with glaring eyes inset within a red outline.", ch, NULL, NULL, TO_CHAR );
act( AT_RED, "$n howls with anger as $s hair turns black again and grows", ch, NULL, NULL, TO_NOTVICT );
act( AT_RED, "thick red fur all over $s body, finally $e sprouts a", ch, NULL, NULL, TO_NOTVICT );
act( AT_RED, "tail and looks up at you with glaring eyes inset within a red outline.", ch, NULL, NULL, TO_NOTVICT );
act( AT_RED, "You look up at $N, with rage filled eyes, ready to kill...", ch, NULL, victim, TO_CHAR );
act( AT_RED, "$n looks up at you, with rage filled eyes, ready to kill...", ch, NULL, victim, TO_VICT );
act( AT_RED, "$n looks up at $N, with rage filled eyes, ready to kill...", ch, NULL, victim, TO_NOTVICT );
act( AT_RED, "=-", ch, NULL, victim, TO_CHAR );
act( AT_RED, "=-", ch, NULL, victim, TO_VICT );
act( AT_RED, "=-", ch, NULL, victim, TO_NOTVICT );
ch->pcdata->learned[gsn_ssj4] = 10;
if (xIS_SET((ch)->affected_by, AFF_KAIOKEN))
xREMOVE_BIT((ch)->affected_by, AFF_KAIOKEN);
if (xIS_SET((ch)->affected_by, AFF_OOZARU))
xREMOVE_BIT((ch)->affected_by, AFF_OOZARU);
if (xIS_SET((ch)->affected_by, AFF_GOLDEN_OOZARU))
xREMOVE_BIT((ch)->affected_by, AFF_GOLDEN_OOZARU);
if (!xIS_SET(ch->affected_by, AFF_SSJ))
xSET_BIT( (ch)->affected_by, AFF_SSJ );
if (!xIS_SET(ch->affected_by, AFF_SSJ2))
xSET_BIT( (ch)->affected_by, AFF_SSJ2 );
if (!xIS_SET(ch->affected_by, AFF_SSJ3))
xSET_BIT( (ch)->affected_by, AFF_SSJ3 );
xSET_BIT( (ch)->affected_by, AFF_SSJ4 );
ch->pl = ch->exp * 30;
transStatApply(ch, 30, 15, 8, 15);
ch->delay = 0;
ch->rage = 0;
add_timer( ch, TIMER_ASUPRESSED, 8, NULL, 1 );
add_timer( victim, TIMER_ASUPRESSED, 8, NULL, 1 );
break;
}
return;
}
void heart_calc( CHAR_DATA *ch, char *argument )
{
double pl_mult = 1;
double pl_mult2 = 1;
int con = 0;
double chk = 0;
/*if (ch->race != 1 || IS_NPC(ch))
return;*/
if( !is_human(ch) || IS_NPC(ch) )
return;
if (ch->exp > ch->pl)
return;
if (!IS_SET(ch->pcdata->combatFlags, CMB_NO_HEART))
return;
if (!xIS_SET(ch->affected_by, AFF_HEART))
ch->heart_pl = ch->pl;
con = (get_curr_con(ch)) - 10;
if (con < 1)
{
if (xIS_SET(ch->affected_by, AFF_HEART))
xREMOVE_BIT(ch->affected_by, AFF_HEART);
ch->pl = ch->heart_pl;
return;
}
if (ch->hit >= 90 || ch->hit <= 0)
{
if (xIS_SET(ch->affected_by, AFF_HEART))
xREMOVE_BIT(ch->affected_by, AFF_HEART);
ch->pl = ch->heart_pl;
return;
}
pl_mult = con / 10;
chk = (double)(18 - (ch->hit / 5)) / 18 * pl_mult;
if (chk <= 1)
{
if (xIS_SET(ch->affected_by, AFF_HEART))
xREMOVE_BIT(ch->affected_by, AFF_HEART);
ch->pl = ch->heart_pl;
return;
}
if (!xIS_SET(ch->affected_by, AFF_HEART))
{
xSET_BIT(ch->affected_by, AFF_HEART);
}
pl_mult2 = (double) ch->heart_pl / ch->exp;
chk = (double) pl_mult2 + chk;
ch->pl = ch->exp * chk;
act( AT_RED, "", ch, NULL, NULL, TO_CHAR );
act( AT_RED, "", ch, NULL, NULL, TO_NOTVICT );
return;
}
void do_powerdown( CHAR_DATA *ch, char *argument )
{
CHAR_DATA *och;
CHAR_DATA *och_next;
if( IS_AFFECTED(ch,AFF_BIOJR) && IS_NPC(ch) )
return;
if( wearing_chip(ch) )
{
ch_printf(ch,"You can't while you have a chip installed.\n\r");
return;
}
if (ch->pl <= ch->exp)
{
send_to_char( "You are already powered down.\n\r", ch );
ch->powerup = 0;
if (xIS_SET((ch)->affected_by, AFF_SSJ))
{
xREMOVE_BIT((ch)->affected_by, AFF_SSJ);
if( !IS_NPC( ch ) )
{
ch->pcdata->haircolor = ch->pcdata->orignalhaircolor;
ch->pcdata->eyes = ch->pcdata->orignaleyes;
}
}
if (xIS_SET((ch)->affected_by, AFF_USSJ))
xREMOVE_BIT((ch)->affected_by, AFF_USSJ);
if (xIS_SET((ch)->affected_by, AFF_USSJ2))
xREMOVE_BIT((ch)->affected_by, AFF_USSJ2);
if (xIS_SET((ch)->affected_by, AFF_SSJ2))
xREMOVE_BIT((ch)->affected_by, AFF_SSJ2);
if (xIS_SET((ch)->affected_by, AFF_SSJ3))
xREMOVE_BIT((ch)->affected_by, AFF_SSJ3);
if (xIS_SET((ch)->affected_by, AFF_SSJ4))
xREMOVE_BIT((ch)->affected_by, AFF_SSJ4);
if (xIS_SET((ch)->affected_by, AFF_KAIOKEN))
xREMOVE_BIT((ch)->affected_by, AFF_KAIOKEN);
if (xIS_SET((ch)->affected_by, AFF_SNAMEK))
xREMOVE_BIT((ch)->affected_by, AFF_SNAMEK);
if (xIS_SET((ch)->affected_by, AFF_ICER2))
xREMOVE_BIT((ch)->affected_by, AFF_ICER2);
if (xIS_SET((ch)->affected_by, AFF_ICER3))
xREMOVE_BIT((ch)->affected_by, AFF_ICER3);
if (xIS_SET((ch)->affected_by, AFF_ICER4))
xREMOVE_BIT((ch)->affected_by, AFF_ICER4);
if (xIS_SET((ch)->affected_by, AFF_ICER5))
xREMOVE_BIT((ch)->affected_by, AFF_ICER5);
if (xIS_SET((ch)->affected_by, AFF_HEART))
xREMOVE_BIT(ch->affected_by, AFF_HEART);
if (xIS_SET((ch)->affected_by, AFF_HYPER))
xREMOVE_BIT(ch->affected_by, AFF_HYPER);
if (xIS_SET((ch)->affected_by, AFF_EXTREME))
xREMOVE_BIT((ch)->affected_by, AFF_EXTREME);
if (xIS_SET((ch)->affected_by, AFF_SEMIPERFECT))
xREMOVE_BIT(ch->affected_by, AFF_SEMIPERFECT);
if (xIS_SET((ch)->affected_by, AFF_PERFECT))
xREMOVE_BIT(ch->affected_by, AFF_PERFECT);
if (xIS_SET((ch)->affected_by, AFF_ULTRAPERFECT))
xREMOVE_BIT(ch->affected_by, AFF_ULTRAPERFECT);
if (xIS_SET((ch)->affected_by, AFF_GROWTH))
xREMOVE_BIT(ch->affected_by, AFF_GROWTH);
if (xIS_SET((ch)->affected_by, AFF_GIANT))
xREMOVE_BIT(ch->affected_by, AFF_GIANT);
if (xIS_SET((ch)->affected_by, AFF_EVIL_TRANS))
xREMOVE_BIT(ch->affected_by, AFF_EVIL_TRANS);
if (xIS_SET((ch)->affected_by, AFF_SUPER_TRANS))
xREMOVE_BIT(ch->affected_by, AFF_SUPER_TRANS);
if (xIS_SET((ch)->affected_by, AFF_KID_TRANS))
xREMOVE_BIT(ch->affected_by, AFF_KID_TRANS);
if (xIS_SET((ch)->affected_by, AFF_MYSTIC))
xREMOVE_BIT(ch->affected_by, AFF_MYSTIC);
if (xIS_SET((ch)->affected_by, AFF_SUPERANDROID))
xREMOVE_BIT(ch->affected_by, AFF_SUPERANDROID);
if (xIS_SET((ch)->affected_by, AFF_EVILBOOST))
xREMOVE_BIT(ch->affected_by, AFF_EVILBOOST);
if (xIS_SET((ch)->affected_by, AFF_EVILSURGE))
xREMOVE_BIT(ch->affected_by, AFF_EVILSURGE);
if (xIS_SET((ch)->affected_by, AFF_EVILOVERLOAD))
xREMOVE_BIT(ch->affected_by, AFF_EVILOVERLOAD);
transStatRemove(ch);
heart_calc(ch, "");
if( is_splitformed(ch) )
{
for ( och = first_char; och; och = och_next )
{
och_next = och->next;
if( !IS_NPC(och))
continue;
if( is_split(och) && och->master == ch)
do_powerdown(och,"");
}
}
return;
}
if (ch->exp != ch->pl && xIS_SET(ch->affected_by, AFF_OOZARU))
{
send_to_char( "You can't while you are an Oozaru.\n\r", ch );
return;
}
if (ch->exp != ch->pl && xIS_SET(ch->affected_by, AFF_GOLDEN_OOZARU))
{
send_to_char( "You can't while you are a Golden Oozaru.\n\r", ch );
return;
}
if (ch->exp != ch->pl && xIS_SET(ch->affected_by, AFF_MAKEOSTAR))
{
send_to_char( "You can't while you are being affected by the Makeo Star.\n\r", ch );
return;
}
if ( xIS_SET((ch)->affected_by, AFF_SSJ)
|| xIS_SET((ch)->affected_by, AFF_USSJ)
|| xIS_SET((ch)->affected_by, AFF_USSJ2)
|| xIS_SET((ch)->affected_by, AFF_SSJ2)
|| xIS_SET((ch)->affected_by, AFF_SSJ3)
|| xIS_SET((ch)->affected_by, AFF_SSJ4)
|| xIS_SET((ch)->affected_by, AFF_KAIOKEN)
|| xIS_SET((ch)->affected_by, AFF_HYPER)
|| xIS_SET((ch)->affected_by, AFF_EXTREME)
|| xIS_SET((ch)->affected_by, AFF_SNAMEK)
|| xIS_SET((ch)->affected_by, AFF_ICER2)
|| xIS_SET((ch)->affected_by, AFF_ICER3)
|| xIS_SET((ch)->affected_by, AFF_ICER4)
|| xIS_SET((ch)->affected_by, AFF_ICER5)
|| xIS_SET((ch)->affected_by, AFF_SEMIPERFECT)
|| xIS_SET((ch)->affected_by, AFF_PERFECT)
|| xIS_SET((ch)->affected_by, AFF_ULTRAPERFECT)
|| xIS_SET((ch)->affected_by, AFF_GROWTH)
|| xIS_SET((ch)->affected_by, AFF_GIANT)
|| xIS_SET((ch)->affected_by, AFF_EVIL_TRANS)
|| xIS_SET((ch)->affected_by, AFF_SUPER_TRANS)
|| xIS_SET((ch)->affected_by, AFF_KID_TRANS)
|| xIS_SET((ch)->affected_by, AFF_MYSTIC)
|| xIS_SET((ch)->affected_by, AFF_SUPERANDROID)
|| xIS_SET((ch)->affected_by, AFF_EVILBOOST)
|| xIS_SET((ch)->affected_by, AFF_EVILSURGE)
|| xIS_SET((ch)->affected_by, AFF_EVILOVERLOAD) )
{
if (xIS_SET((ch)->affected_by, AFF_SSJ))
{
xREMOVE_BIT((ch)->affected_by, AFF_SSJ);
if( !IS_NPC( ch ) )
{
ch->pcdata->haircolor = ch->pcdata->orignalhaircolor;
ch->pcdata->eyes = ch->pcdata->orignaleyes;
}
}
if (xIS_SET((ch)->affected_by, AFF_USSJ))
xREMOVE_BIT((ch)->affected_by, AFF_USSJ);
if (xIS_SET((ch)->affected_by, AFF_USSJ2))
xREMOVE_BIT((ch)->affected_by, AFF_USSJ2);
if (xIS_SET((ch)->affected_by, AFF_SSJ2))
xREMOVE_BIT((ch)->affected_by, AFF_SSJ2);
if (xIS_SET((ch)->affected_by, AFF_SSJ3))
xREMOVE_BIT((ch)->affected_by, AFF_SSJ3);
if (xIS_SET((ch)->affected_by, AFF_SSJ4))
xREMOVE_BIT((ch)->affected_by, AFF_SSJ4);
if (xIS_SET((ch)->affected_by, AFF_KAIOKEN))
xREMOVE_BIT((ch)->affected_by, AFF_KAIOKEN);
if (xIS_SET((ch)->affected_by, AFF_SNAMEK))
xREMOVE_BIT((ch)->affected_by, AFF_SNAMEK);
if (xIS_SET((ch)->affected_by, AFF_ICER2))
xREMOVE_BIT((ch)->affected_by, AFF_ICER2);
if (xIS_SET((ch)->affected_by, AFF_ICER3))
xREMOVE_BIT((ch)->affected_by, AFF_ICER3);
if (xIS_SET((ch)->affected_by, AFF_ICER4))
xREMOVE_BIT((ch)->affected_by, AFF_ICER4);
if (xIS_SET((ch)->affected_by, AFF_ICER5))
xREMOVE_BIT((ch)->affected_by, AFF_ICER5);
if (xIS_SET((ch)->affected_by, AFF_HYPER))
xREMOVE_BIT(ch->affected_by, AFF_HYPER);
if (xIS_SET((ch)->affected_by, AFF_EXTREME))
xREMOVE_BIT((ch)->affected_by, AFF_EXTREME);
if (xIS_SET((ch)->affected_by, AFF_SEMIPERFECT))
xREMOVE_BIT(ch->affected_by, AFF_SEMIPERFECT);
if (xIS_SET((ch)->affected_by, AFF_PERFECT))
xREMOVE_BIT(ch->affected_by, AFF_PERFECT);
if (xIS_SET((ch)->affected_by, AFF_ULTRAPERFECT))
xREMOVE_BIT(ch->affected_by, AFF_ULTRAPERFECT);
if (xIS_SET((ch)->affected_by, AFF_GROWTH))
xREMOVE_BIT(ch->affected_by, AFF_GROWTH);
if (xIS_SET((ch)->affected_by, AFF_GIANT))
xREMOVE_BIT(ch->affected_by, AFF_GIANT);
if (xIS_SET((ch)->affected_by, AFF_EVIL_TRANS))
xREMOVE_BIT(ch->affected_by, AFF_EVIL_TRANS);
if (xIS_SET((ch)->affected_by, AFF_SUPER_TRANS))
xREMOVE_BIT(ch->affected_by, AFF_SUPER_TRANS);
if (xIS_SET((ch)->affected_by, AFF_KID_TRANS))
xREMOVE_BIT(ch->affected_by, AFF_KID_TRANS);
if (xIS_SET((ch)->affected_by, AFF_MYSTIC))
xREMOVE_BIT(ch->affected_by, AFF_MYSTIC);
if (xIS_SET((ch)->affected_by, AFF_SUPERANDROID))
xREMOVE_BIT(ch->affected_by, AFF_SUPERANDROID);
if (xIS_SET((ch)->affected_by, AFF_EVILBOOST))
xREMOVE_BIT(ch->affected_by, AFF_EVILBOOST);
if (xIS_SET((ch)->affected_by, AFF_EVILSURGE))
xREMOVE_BIT(ch->affected_by, AFF_EVILSURGE);
if (xIS_SET((ch)->affected_by, AFF_EVILOVERLOAD))
xREMOVE_BIT(ch->affected_by, AFF_EVILOVERLOAD);
}
ch->powerup = 0;
send_to_pager_color( "&BYou power down and return to normal.\n\r", ch );
if (xIS_SET((ch)->affected_by, AFF_HEART))
xREMOVE_BIT(ch->affected_by, AFF_HEART);
transStatRemove(ch);
ch->pl = ch->exp;
heart_calc(ch, "");
if( is_splitformed(ch) )
{
for ( och = first_char; och; och = och_next )
{
och_next = och->next;
if( !IS_NPC(och))
continue;
if( is_split(och) && och->master == ch)
do_powerdown(och,"");
}
}
return;
}
void do_powerup( CHAR_DATA *ch, char *argument )
{
CHAR_DATA *och;
CHAR_DATA *och_next;
float pl_mult = 1;
int auraColor = AT_YELLOW;
if( IS_AFFECTED(ch,AFF_BIOJR) && IS_NPC(ch) )
return;
if( wearing_chip(ch) )
{
ch_printf(ch,"You can't while you have a chip installed.\n\r");
return;
}
if ( xIS_SET((ch)->affected_by, AFF_SSJ)
|| xIS_SET((ch)->affected_by, AFF_SSJ2)
|| xIS_SET((ch)->affected_by, AFF_SSJ3)
|| xIS_SET((ch)->affected_by, AFF_SSJ4)
|| xIS_SET((ch)->affected_by, AFF_KAIOKEN)
|| xIS_SET((ch)->affected_by, AFF_HYPER)
|| xIS_SET((ch)->affected_by, AFF_SNAMEK)
|| xIS_SET((ch)->affected_by, AFF_ICER2)
|| xIS_SET((ch)->affected_by, AFF_ICER3)
|| xIS_SET((ch)->affected_by, AFF_ICER4)
|| xIS_SET((ch)->affected_by, AFF_ICER5)
|| xIS_SET((ch)->affected_by, AFF_SEMIPERFECT)
|| xIS_SET((ch)->affected_by, AFF_PERFECT)
|| xIS_SET((ch)->affected_by, AFF_ULTRAPERFECT)
|| xIS_SET((ch)->affected_by, AFF_OOZARU)
|| xIS_SET((ch)->affected_by, AFF_GOLDEN_OOZARU)
|| xIS_SET((ch)->affected_by, AFF_EXTREME)
|| xIS_SET((ch)->affected_by, AFF_MYSTIC)
|| xIS_SET((ch)->affected_by, AFF_SUPERANDROID)
|| xIS_SET((ch)->affected_by, AFF_MAKEOSTAR)
|| xIS_SET((ch)->affected_by, AFF_EVILBOOST)
|| xIS_SET((ch)->affected_by, AFF_EVILSURGE)
|| xIS_SET((ch)->affected_by, AFF_EVILOVERLOAD) )
{
send_to_pager_color( "&BYou can't power up any more in this form.\n\r", ch );
return;
}
if( !IS_NPC( ch ) && ch->pcdata->auraColorPowerUp > 0 )
auraColor = ch->pcdata->auraColorPowerUp;
if ( !str_cmp( argument, "max" ) )
{
if( is_android(ch) || is_superandroid(ch) )
{
act( auraColor, "With a bright flash and a deafening boom that fills the air with a static charge you power up to your maximum.", ch, NULL, NULL, TO_CHAR );
act( auraColor, "With a bright flash and a deafening boom that fills the air with a static charge $n powers up to $s maximum.", ch, NULL, NULL, TO_NOTVICT );
}
else
{
act( auraColor, "With a blinding flash you power up to your maximum.", ch, NULL, NULL, TO_CHAR );
act( auraColor, "With a blinding flash $n powers up to $s maximum.", ch, NULL, NULL, TO_NOTVICT );
}
if (ch->exp <= 100000)
{
ch->powerup = 1;
pl_mult = 1.1;
}
else if (ch->exp <= 250000)
{
ch->powerup = 2;
pl_mult = 1.2;
}
else if (ch->exp <= 500000)
{
ch->powerup = 3;
pl_mult = 1.3;
}
else if (ch->exp <= 1000000)
{
ch->powerup = 4;
pl_mult = 1.4;
}
else if (ch->exp <= 2000000)
{
ch->powerup = 5;
pl_mult = 1.5;
}
else if (ch->exp <= 5000000)
{
ch->powerup = 6;
pl_mult = 1.6;
}
else
{
ch->powerup = 7;
pl_mult = 1.7;
}
if (xIS_SET((ch)->affected_by, AFF_HEART))
xREMOVE_BIT(ch->affected_by, AFF_HEART);
ch->pl = ch->exp * pl_mult;
heart_calc(ch, "");
if( is_splitformed(ch) )
{
for ( och = first_char; och; och = och_next )
{
och_next = och->next;
if( !IS_NPC(och))
continue;
if( is_split(och) && och->master == ch)
do_powerup(och,argument);
}
}
return;
}
if (ch->pl < ch->exp)
{
act( auraColor, "You power up to your base.", ch, NULL, NULL, TO_CHAR );
act( auraColor, "$n powers up to $s base.", ch, NULL, NULL, TO_NOTVICT );
if (xIS_SET((ch)->affected_by, AFF_HEART))
xREMOVE_BIT(ch->affected_by, AFF_HEART);
ch->powerup = 0;
ch->pl = ch->exp;
heart_calc(ch, "");
if( is_splitformed(ch) )
{
for ( och = first_char; och; och = och_next )
{
och_next = och->next;
if( !IS_NPC(och))
continue;
if( is_split(och) && och->master == ch)
do_powerup(och,argument);
}
}
return;
}
if (ch->powerup == 0)
{
if( is_android(ch) || is_superandroid(ch) )
{
act( auraColor, "A soft hum begins to fill the air as you power up for the first time.", ch, NULL, NULL, TO_CHAR );
act( auraColor, "A soft hum begins to fill the air as $n powers up for the first time.", ch, NULL, NULL, TO_NOTVICT );
}
else
{
act( auraColor, "You begin to glow as you power up for the first time.", ch, NULL, NULL, TO_CHAR );
act( auraColor, "$n begins to glow as $e powers up for the first time.", ch, NULL, NULL, TO_NOTVICT );
}
ch->powerup = 1;
pl_mult = 1.1;
if (xIS_SET((ch)->affected_by, AFF_HEART))
xREMOVE_BIT(ch->affected_by, AFF_HEART);
ch->pl = ch->exp * pl_mult;
heart_calc(ch, "");
if( is_splitformed(ch) )
{
for ( och = first_char; och; och = och_next )
{
och_next = och->next;
if( !IS_NPC(och))
continue;
if( is_split(och) && och->master == ch)
do_powerup(och,argument);
}
}
}
else if (ch->powerup == 1 && ch->exp > 100000)
{
if( is_android(ch) || is_superandroid(ch) )
{
act( auraColor, "The soft hum coming from you is joined by whirring and grinding noises as you power up for the second time.", ch, NULL, NULL, TO_CHAR );
act( auraColor, "The soft hum coming from $n is joined by whirring and grinding noises as $e powers up for the second time.", ch, NULL, NULL, TO_NOTVICT );
}
else
{
act( auraColor, "You begin to glow more as you power up for the second time.", ch, NULL, NULL, TO_CHAR );
act( auraColor, "$n begins to glow more as $e powers up for the second time.", ch, NULL, NULL, TO_NOTVICT );
}
ch->powerup = 2;
pl_mult = 1.2;
if (xIS_SET((ch)->affected_by, AFF_HEART))
xREMOVE_BIT(ch->affected_by, AFF_HEART);
ch->pl = ch->exp * pl_mult;
heart_calc(ch, "");
if( is_splitformed(ch) )
{
for ( och = first_char; och; och = och_next )
{
och_next = och->next;
if( !IS_NPC(och))
continue;
if( is_split(och) && och->master == ch)
do_powerup(och,argument);
}
}
}
else if (ch->powerup == 2 && ch->exp > 250000)
{
if( is_android(ch) || is_superandroid(ch) )
{
act( auraColor, "The air around you gains a static charge as you power up for the third time.", ch, NULL, NULL, TO_CHAR );
act( auraColor, "The air around $n gains a static charge as $e powers up for the third time.", ch, NULL, NULL, TO_NOTVICT );
}
else
{
act( auraColor, "You begin to glow brightly as you power up for the third time.", ch, NULL, NULL, TO_CHAR );
act( auraColor, "$n begins to glow brightly as $e powers up for the third time.", ch, NULL, NULL, TO_NOTVICT );
}
ch->powerup = 3;
pl_mult = 1.3;
if (xIS_SET((ch)->affected_by, AFF_HEART))
xREMOVE_BIT(ch->affected_by, AFF_HEART);
ch->pl = ch->exp * pl_mult;
heart_calc(ch, "");
if( is_splitformed(ch) )
{
for ( och = first_char; och; och = och_next )
{
och_next = och->next;
if( !IS_NPC(och))
continue;
if( is_split(och) && och->master == ch)
do_powerup(och,argument);
}
}
}
else if (ch->powerup == 3 && ch->exp > 500000)
{
if( is_android(ch) || is_superandroid(ch) )
{
act( auraColor, "An internal engine roars to life, the ground shaking softly, as you power up for the fourth time.", ch, NULL, NULL, TO_CHAR );
act( auraColor, "An internal engine roars to life, the ground shaking softly, as $e powers up for the fourth time.", ch, NULL, NULL, TO_NOTVICT );
}
else
{
act( auraColor, "The ground trembles under your feet as you power up for the fourth time.", ch, NULL, NULL, TO_CHAR );
act( auraColor, "The ground trembles under $n's feet as $e powers up for the fourth time.", ch, NULL, NULL, TO_NOTVICT );
}
ch->powerup = 4;
pl_mult = 1.4;
if (xIS_SET((ch)->affected_by, AFF_HEART))
xREMOVE_BIT(ch->affected_by, AFF_HEART);
ch->pl = ch->exp * pl_mult;
heart_calc(ch, "");
if( is_splitformed(ch) )
{
for ( och = first_char; och; och = och_next )
{
och_next = och->next;
if( !IS_NPC(och))
continue;
if( is_split(och) && och->master == ch)
do_powerup(och,argument);
}
}
}
else if (ch->powerup == 4 && ch->exp > 1000000)
{
if( is_android(ch) || is_superandroid(ch) )
{
act( auraColor, "A high-pitched whine comes from your body, cracks appearing under your feet, as you power up for the fifth time.", ch, NULL, NULL, TO_CHAR );
act( auraColor, "A high-pithced whine comes from $n's body, cracks appearing under $s feet, as $e powers up for the fifth time.", ch, NULL, NULL, TO_NOTVICT );
}
else
{
act( auraColor, "The ground really shakes as you power up for the fifth time.", ch, NULL, NULL, TO_CHAR );
act( auraColor, "The ground really shakes as $n powers up for the fifth time.", ch, NULL, NULL, TO_NOTVICT );
}
ch->powerup = 5;
pl_mult = 1.5;
if (xIS_SET((ch)->affected_by, AFF_HEART))
xREMOVE_BIT(ch->affected_by, AFF_HEART);
ch->pl = ch->exp * pl_mult;
heart_calc(ch, "");
if( is_splitformed(ch) )
{
for ( och = first_char; och; och = och_next )
{
och_next = och->next;
if( !IS_NPC(och))
continue;
if( is_split(och) && och->master == ch)
do_powerup(och,argument);
}
}
}
else if (ch->powerup == 5 && ch->exp > 2000000)
{
if( is_android(ch) || is_superandroid(ch) )
{
act( auraColor, "Engine roaring loudly and electricity crackling through the air, you power up for the sixth time.", ch, NULL, NULL, TO_CHAR );
act( auraColor, "Engine roaring loudly and electricity crackling through the air, $n powers up for the sixth time.", ch, NULL, NULL, TO_NOTVICT );
}
else
{
act( auraColor, "Pieces of rock fly around as you power up for the sixth time.", ch, NULL, NULL, TO_CHAR );
act( auraColor, "Pieces of rock fly around as $n powers up for the sixth time.", ch, NULL, NULL, TO_NOTVICT );
}
ch->powerup = 6;
pl_mult = 1.6;
if (xIS_SET((ch)->affected_by, AFF_HEART))
xREMOVE_BIT(ch->affected_by, AFF_HEART);
ch->pl = ch->exp * pl_mult;
heart_calc(ch, "");
if( is_splitformed(ch) )
{
for ( och = first_char; och; och = och_next )
{
och_next = och->next;
if( !IS_NPC(och))
continue;
if( is_split(och) && och->master == ch)
do_powerup(och,argument);
}
}
}
else if (ch->powerup == 6 && ch->exp > 5000000)
{
if( is_android(ch) || is_superandroid(ch) )
{
act( auraColor, "The stench of ozone fills the humming air, a deafening boom blasting from you, as you power up for the last time.", ch, NULL, NULL, TO_CHAR );
act( auraColor, "The stench of ozone fills the humming air, a deafening boom blasting from $n, as $e powers up for the last time.", ch, NULL, NULL, TO_NOTVICT );
}
else
{
act( auraColor, "Large chunks of rock crumble all around as you power up for the last time.", ch, NULL, NULL, TO_CHAR );
act( auraColor, "Large chunks of rock crumble all around as $n powers up for the last time.", ch, NULL, NULL, TO_NOTVICT );
}
ch->powerup = 7;
pl_mult = 1.7;
if (xIS_SET((ch)->affected_by, AFF_HEART))
xREMOVE_BIT(ch->affected_by, AFF_HEART);
ch->pl = ch->exp * pl_mult;
heart_calc(ch, "");
if( is_splitformed(ch) )
{
for ( och = first_char; och; och = och_next )
{
och_next = och->next;
if( !IS_NPC(och))
continue;
if( is_split(och) && och->master == ch)
do_powerup(och,argument);
}
}
}
else
send_to_pager_color( "&BYou are already powered up to your max.\n\r", ch );
return;
}
void show_char_to_char_scan( CHAR_DATA *list, CHAR_DATA *ch, OBJ_DATA *scouter)
{
CHAR_DATA *rch;
long double scaned_pl = (long double)0;
long double scouter_pl = (long double)0;
for ( rch = list; rch; rch = rch->next_in_room )
{
if ( rch == ch )
continue;
if ( IS_NPC(rch) )
scaned_pl = rch->exp;
else
scaned_pl = rch->pl;
if ( !is_android(ch) && !is_superandroid(ch) )
{
scouter_pl = (long double)(scouter->value[2] * (long double)100);
if ((long double)scaned_pl > (long double)scouter_pl)
{
scaned_pl = -1;
}
if ( scaned_pl == -1 )
{
act( AT_GREY, "Your scouter explodes from a very strong power.", ch, NULL, rch, TO_CHAR );
act( AT_GREY, "$n's scouter explodes from someones power.", ch, NULL, rch, TO_ROOM );
obj_from_char( scouter );
extract_obj( scouter );
break;
}
}
if (is_android(ch) || is_superandroid(ch))
{
if (ch->pl < ch->exp)
{
if (scaned_pl > (long double)(ch->exp * (long double)8) )
{
return;
}
}
else
{
if (scaned_pl > (long double)(ch->pl * (long double)8) )
{
return;
}
}
}
pager_printf_color(ch, "You detect a power level of %s.\n\r", num_punct_ld(scaned_pl) );
return;
}
}
void do_scan( CHAR_DATA *ch, char *argument )
{
ROOM_INDEX_DATA *was_in_room;
EXIT_DATA *pexit;
sh_int dir = -1;
sh_int dist;
sh_int max_dist = 0;
OBJ_DATA *scouter = NULL;
CHAR_DATA *victim = NULL;
long double scaned_pl;
long double scouter_pl;
bool HBTCset = FALSE;
set_char_color( AT_ACTION, ch );
if ( IS_AFFECTED( ch, AFF_BLIND ) )
{
send_to_char( "Not very effective when you're blind...\n\r", ch );
return;
}
if ( !is_android(ch) && !is_superandroid(ch) &&
!wearing_sentient_chip(ch) &&
(scouter = has_scouter(ch)) == NULL )
{
send_to_char( "You need a scouter to do that.\n\r", ch );
return;
}
if ( argument[0] == '\0' )
{
send_to_char( "You must scan in a direction or focus on a person.\n\r", ch );
return;
}
if ( ( dir = get_door( argument ) ) == -1
&& (victim = get_char_room( ch, argument )) == NULL)
{
send_to_char( "Scan what?\n\r", ch );
return;
}
if (IS_IMMORTAL(ch) && get_trust( ch ) < 59 )
{
send_to_char("You shouldn't be scanning mortals.\n\r",ch);
return;
}
if ( victim )
{
act( AT_GREY, "You scan $N with your scouter.", ch, NULL, victim, TO_CHAR );
act( AT_GREY, "$n scans you with $s scouter.", ch, NULL, victim, TO_VICT );
act( AT_GREY, "$n scans $N with $s scouter.", ch, NULL, victim, TO_NOTVICT );
if ( IS_NPC(victim) )
scaned_pl = victim->exp;
else
scaned_pl = victim->pl;
if (!is_android(ch) && !is_superandroid(ch) &&
!wearing_sentient_chip(ch) )
{
scouter_pl = ((long double)(scouter->value[2])) * 100;
if ((long double)scaned_pl > (long double)scouter_pl)
{
scaned_pl = -1;
}
}
if ( scaned_pl == -1 ) {
act( AT_GREY, "Your scouter explodes from $N's power.", ch, NULL, victim, TO_CHAR );
act( AT_GREY, "$n's scouter explodes from your power.", ch, NULL, victim, TO_VICT );
act( AT_GREY, "$n's scouter explodes from $N's power.", ch, NULL, victim, TO_NOTVICT );
obj_from_char( scouter );
extract_obj( scouter );
return;
}
if (is_android(ch) || is_superandroid(ch) ||
wearing_sentient_chip(ch) )
{
int a = 0;
if( is_android(ch) || wearing_sentient_chip(ch) )
a = 8;
if( is_superandroid(ch) )
a = 24;
if (ch->pl < ch->exp)
{
if (scaned_pl > ch->exp * a)
{
pager_printf_color(ch, "You don't want your head to explode do you?");
return;
}
}
else
{
if (scaned_pl > ch->pl * a)
{
pager_printf_color(ch, "You don't want your head to explode do you?");
return;
}
}
}
if (IS_NPC(victim))
pager_printf_color(ch, "%s's power level is %s.", victim->short_descr, num_punct_ld(scaned_pl) );
else
pager_printf_color(ch, "%s's power level is %s.", victim->name, num_punct_ld(scaned_pl) );
return;
}
if( !IS_NPC( ch ) && ch->pcdata->nextHBTCDate != 0 )
{
HBTCset = TRUE;
}
was_in_room = ch->in_room;
act( AT_GREY, "Scanning $t...", ch, dir_name[dir], NULL, TO_CHAR );
act( AT_GREY, "$n scans $t.", ch, dir_name[dir], NULL, TO_ROOM );
if ( ( pexit = get_exit( ch->in_room, dir ) ) == NULL )
{
act( AT_GREY, "You can't see $t.", ch, dir_name[dir], NULL, TO_CHAR );
return;
}
if (scouter)
max_dist = scouter->value[2]/10000;
else
max_dist = ch->exp/100000;
if (max_dist > 15)
max_dist = 15;
for ( dist = 1; dist <= max_dist; )
{
char_from_room( ch );
char_to_room( ch, pexit->to_room );
set_char_color( AT_RMNAME, ch );
send_to_char( ch->in_room->name, ch );
send_to_char( "\n\r", ch );
show_char_to_char_scan( ch->in_room->first_person, ch, scouter);
if ( !has_scouter(ch) )
break;
switch( ch->in_room->sector_type )
{
default: dist++; break;
case SECT_AIR:
if ( number_percent() < 80 ) dist++; break;
case SECT_INSIDE:
case SECT_FIELD:
case SECT_UNDERGROUND:
dist++; break;
case SECT_FOREST:
case SECT_CITY:
case SECT_DESERT:
case SECT_HILLS:
dist += 2; break;
case SECT_WATER_SWIM:
case SECT_WATER_NOSWIM:
dist += 3; break;
case SECT_MOUNTAIN:
case SECT_UNDERWATER:
case SECT_OCEANFLOOR:
dist += 4; break;
}
if ( dist >= max_dist )
{
act( AT_GREY, "There is to much interference to scan farther $t.", ch, dir_name[dir], NULL, TO_CHAR );
break;
}
if ( ( pexit = get_exit( ch->in_room, dir ) ) == NULL )
{
act( AT_GREY, "Your scans $t are being blocked by an unknown force...", ch,
dir_name[dir], NULL, TO_CHAR );
break;
}
}
char_from_room( ch );
char_to_room( ch, was_in_room );
if( HBTCset == FALSE )
{
ch->pcdata->nextHBTCDate = 0;
}
return;
}
void do_radar( CHAR_DATA *ch, char *argument)
{
OBJ_DATA *radar;
CHAR_DATA *vch;
AREA_DATA *area;
OBJ_DATA *obj;
sh_int count = 0;
if ( (radar = has_dragonradar(ch)) == NULL )
{
send_to_char( "You must be holding a dragonball radar to do that.\n\r", ch );
return;
}
if ( argument[0] == '\0' )
{
ch_printf(ch,"\n\rSyntax: radar area\n\r");
ch_printf(ch," or: radar (victim)\n\r");
ch_printf(ch,"\n\rUsing \"radar area\" will sweep the entire area and tell you if it detects any dragonballs, and how many.\n\r");
ch_printf(ch,"Using \"radar (victim)\" will scan a person and see if they are holding any dragonballs.\n\r");
return;
}
if( !str_cmp(argument,"area") )
{
act( AT_GREY, " ", ch, NULL, NULL, TO_CHAR );
act( AT_GREY, "You tap the button on the top of the dragonball radar a couple times.", ch, NULL, NULL, TO_CHAR );
act( AT_GREY, " ", ch, NULL, NULL, TO_NOTVICT );
act( AT_GREY, "$n taps the button on the top of $s dragonball radar a couple times.", ch, NULL, NULL, TO_NOTVICT );
area = ch->in_room->area;
for ( obj = first_object; obj; obj = obj->next )
{
if( obj->item_type != ITEM_DRAGONBALL )
continue;
if( !obj->in_room && !obj->carried_by )
continue;
if( obj->in_room )
{
if( obj->in_room->area != area )
continue;
count++;
continue;
}
if( obj->carried_by )
{
if( !obj->carried_by->in_room )
continue;
if( obj->carried_by->in_room->area != area )
continue;
count++;
continue;
}
}
ch_printf(ch,"&gThere are &Y%d &gdragonball(s) in this region.\n\r",
count );
return;
}
if( (vch = get_char_room(ch,argument)) == NULL )
{
ch_printf(ch,"There is nobody here by that name.\n\r");
return;
}
else
{
act( AT_GREY, " ", ch, NULL, NULL, TO_CHAR );
act( AT_GREY, "You tap the button on the top of the dragonball radar a couple times.", ch, NULL, NULL, TO_CHAR );
act( AT_GREY, " ", ch, NULL, NULL, TO_NOTVICT );
act( AT_GREY, "$n taps the button on the top of $s dragonball radar a couple times.", ch, NULL, NULL, TO_NOTVICT );
if( (obj = carrying_dball(vch)) == NULL )
{
ch_printf(ch,"%s is not carrying any dragonballs.\n\r",
vch->name );
return;
}
OBJ_DATA *obj_next;
for( obj = vch->first_carrying; obj != NULL ; obj = obj_next )
{
obj_next = obj->next_content;
if( obj->item_type == ITEM_DRAGONBALL )
{
count++;
}
}
ch_printf(ch,"&g%s is carrying &Y%d &gdragonball(s).\n\r",
vch->name, count );
return;
}
do_radar(ch,"");
}
/*
* Check for parry.
*/
bool check_parry( CHAR_DATA *ch, CHAR_DATA *victim )
{
int chances = 0;
return FALSE;
if ( !IS_AWAKE(victim) )
return FALSE;
if ( IS_NPC(victim) && !xIS_SET(victim->defenses, DFND_PARRY) )
return FALSE;
if (IS_NPC(victim) && IS_NPC(ch))
chances = victim->exp / ch->exp;
if (IS_NPC(victim) && !IS_NPC(ch))
chances = victim->exp / ch->pl;
if (!IS_NPC(victim) && IS_NPC(ch))
chances = victim->pl / ch->exp;
if (!IS_NPC(victim) && !IS_NPC(ch))
chances = victim->pl / ch->pl;
chances += get_curr_int(victim) - 5;
/* Put in the call to chance() to allow penalties for misaligned
clannies. */
if ( chances != 0 && victim->morph )
chances+=victim->morph->parry;
if ( IS_NPC(victim) && IS_NPC(ch)
&&!chance( victim, chances + (victim->exp / ch->exp) ) )
{
learn_from_failure( victim, gsn_dodge );
return FALSE;
}
if ( IS_NPC(victim) && !IS_NPC(ch)
&&!chance( victim, chances + (victim->exp / ch->pl) ) )
{
learn_from_failure( victim, gsn_dodge );
return FALSE;
}
if ( !IS_NPC(victim) && IS_NPC(ch)
&&!chance( victim, chances + (victim->pl / ch->exp) ) )
{
learn_from_failure( victim, gsn_dodge );
return FALSE;
}
if ( !IS_NPC(victim) && !IS_NPC(ch)
&&!chance( victim, chances + (victim->pl / ch->pl) ) )
{
learn_from_failure( victim, gsn_dodge );
return FALSE;
}
if ( !IS_NPC(victim)
&& !IS_SET( victim->pcdata->flags, PCFLAG_GAG) ) /*SB*/
act( AT_SKILL, "You anticipate $n's attack and block it.", ch, NULL, victim, TO_VICT );
if ( !IS_NPC(ch)
&& !IS_SET( ch->pcdata->flags, PCFLAG_GAG) ) /* SB */
act( AT_SKILL, "$N anticipates your attack and blocks it.", ch, NULL, victim, TO_CHAR );
learn_from_success( victim, gsn_parry );
return TRUE;
}
/*
* Check for dodge.
*/
bool check_dodge( CHAR_DATA *ch, CHAR_DATA *victim )
{
int chances = 0;
return FALSE;
if ( !IS_AWAKE(victim) )
return FALSE;
if ( IS_NPC(victim) && !xIS_SET(victim->defenses, DFND_DODGE) )
return FALSE;
if (IS_NPC(victim) && IS_NPC(ch))
chances = victim->exp / ch->exp;
if (IS_NPC(victim) && !IS_NPC(ch))
chances = victim->exp / ch->pl;
if (!IS_NPC(victim) && !IS_NPC(ch))
chances = victim->pl / ch->exp;
if (!IS_NPC(victim) && !IS_NPC(ch))
chances = victim->pl / ch->pl;
chances += get_curr_dex(victim) - 5;
if ( chances != 0 && victim->morph != NULL )
chances+=victim->morph->dodge;
/* Consider luck as a factor */
if ( IS_NPC(victim) && IS_NPC(ch)
&&!chance( victim, chances + (victim->exp / ch->exp) ) )
{
learn_from_failure( victim, gsn_dodge );
return FALSE;
}
if ( IS_NPC(victim) && !IS_NPC(ch)
&&!chance( victim, chances + (victim->exp / ch->pl) ) )
{
learn_from_failure( victim, gsn_dodge );
return FALSE;
}
if ( !IS_NPC(victim) && IS_NPC(ch)
&&!chance( victim, chances + (victim->pl / ch->exp) ) )
{
learn_from_failure( victim, gsn_dodge );
return FALSE;
}
if ( !IS_NPC(victim) && !IS_NPC(ch)
&&!chance( victim, chances + (victim->pl / ch->pl) ) )
{
learn_from_failure( victim, gsn_dodge );
return FALSE;
}
if ( !IS_NPC(victim) && !IS_SET( victim->pcdata->flags, PCFLAG_GAG) )
act( AT_SKILL, "You dodge $n's attack.", ch, NULL, victim, TO_VICT );
if ( !IS_NPC(ch) && !IS_SET( ch->pcdata->flags, PCFLAG_GAG) )
act( AT_SKILL, "$N dodges your attack.", ch, NULL, victim, TO_CHAR );
learn_from_success( victim, gsn_dodge );
return TRUE;
}
bool check_tumble( CHAR_DATA *ch, CHAR_DATA *victim )
{
return FALSE;
/*
int chances;
if ( victim->class != CLASS_THIEF || !IS_AWAKE( victim ) )
return FALSE;
if ( !IS_NPC( victim )
&& !victim->pcdata->learned[gsn_tumble] > 0 )
return FALSE;
if ( IS_NPC( victim ) )
chances = UMIN( 60, 2 * victim->level );
else
chances = (int) ( LEARNED(victim, gsn_tumble) / sysdata.tumble_mod
+ ( get_curr_dex( victim ) - 13 ) );
if ( chances != 0 && victim->morph )
chances+=victim->morph->tumble;
if ( !chance( victim, chances + victim->level - ch->level ) )
return FALSE;
if ( !IS_NPC(victim) && !IS_SET( victim->pcdata->flags, PCFLAG_GAG ) )
act( AT_SKILL, "You tumble away from $n's attack.", ch, NULL, victim, TO_VICT );
if ( !IS_NPC(ch) && !IS_SET( ch->pcdata->flags, PCFLAG_GAG ) )
act( AT_SKILL, "$N tumbles away from your attack.", ch, NULL, victim, TO_CHAR );
learn_from_success( victim, gsn_tumble );
return TRUE;
*/
}
void do_tail( CHAR_DATA *ch, char *argument )
{
CHAR_DATA *victim;
if ( IS_NPC(ch) && IS_AFFECTED( ch, AFF_CHARM ) )
{
send_to_char( "You can't concentrate enough for that.\n\r", ch );
return;
}
if ( !IS_NPC(ch)
&& ch->level < skill_table[gsn_tail]->skill_level[ch->class] )
{
send_to_char(
"That isn't quite one of your natural skills.\n\r", ch );
return;
}
if ( ( victim = who_fighting( ch ) ) == NULL )
{
send_to_char( "You aren't fighting anyone.\n\r", ch );
return;
}
WAIT_STATE( ch, skill_table[gsn_tail]->beats );
if ( can_use_skill( ch, number_percent(), gsn_tail ) )
{
learn_from_success( ch, gsn_tail );
global_retcode = damage( ch, victim, number_range( 1, ch->level ), gsn_tail );
}
else
{
learn_from_failure( ch, gsn_tail );
global_retcode = damage( ch, victim, 0, gsn_tail );
}
return;
}
void do_kaiocreate(CHAR_DATA *ch, char *argument )
{
OBJ_DATA *o;
OBJ_INDEX_DATA *pObjIndex;
if( IS_NPC(ch) )
return;
if( argument[0] == '\0' )
{
ch_printf(ch,"\n\rSyntax: Kaio create <item>\n\r");
ch_printf(ch,"\n\r");
ch_printf(ch,"Item can only be one of the following:\n\r");
ch_printf(ch,"\n\r");
ch_printf(ch,"shirt pants belt vest sleeves boots\n\r");
return;
}
if( !(!str_cmp(argument,"shirt")) && !(!str_cmp(argument,"pants")) &&
!(!str_cmp(argument,"belt")) && !(!str_cmp(argument,"vest")) &&
!(!str_cmp(argument,"sleeves")) && !(!str_cmp(argument,"boots")) )
{
do_kaiocreate(ch,"");
return;
}
if ( IS_NPC(ch) && IS_AFFECTED( ch, AFF_CHARM ) )
{
send_to_char( "You can't concentrate enough for that.\n\r", ch );
return;
}
if ( !IS_NPC(ch)
&& ch->exp < skill_table[gsn_kaiocreate]->skill_level[ch->class] )
{
send_to_char( "You can't do that.\n\r", ch );
return;
}
if ( ch->mana < skill_table[gsn_kaiocreate]->min_mana )
{
send_to_char( "You don't have enough energy.\n\r", ch );
return;
}
if( ch->carry_number >= 19 )
{
ch_printf(ch,"You haven't got any room.\n\r");
return;
}
WAIT_STATE( ch, skill_table[gsn_kaiocreate]->beats );
if ( can_use_skill(ch, number_percent(),gsn_kaiocreate ) )
{
int a = 0;
if( !str_cmp(argument,"shirt") )
a = 1210;
else if( !str_cmp(argument,"pants") )
a = 1211;
else if( !str_cmp(argument,"vest") )
a = 1212;
else if( !str_cmp(argument,"belt") )
a = 1213;
else if( !str_cmp(argument,"sleeves") )
a = 1214;
else if( !str_cmp(argument,"boots") )
a = 1215;
if( a == 0 )
{
bug("Serious problem in function kaio create",0);
return;
}
act( AT_SKILL, "You focus your powers as a kaio and craft an item from nothingness.", ch, NULL, NULL, TO_CHAR );
act( AT_SKILL, "$n focuses $s powers as a kaio and crafts an item from nothingness.", ch, NULL, NULL, TO_NOTVICT );
learn_from_success( ch, gsn_kaiocreate );
pObjIndex = get_obj_index( a );
o = create_object_new( pObjIndex, 1 , ORIGIN_OINVOKE, ch->name );
o = obj_to_char( o, ch );
save_char_obj( ch );
}
else
{
act( AT_SKILL, "You fail to use your kaio powers to create an item.", ch, NULL, NULL, TO_CHAR );
act( AT_SKILL, "$n fails to use $s kaio powers to create an item.", ch, NULL, NULL, TO_NOTVICT );
learn_from_failure( ch, gsn_kaiocreate );
}
ch->mana -= skill_table[gsn_kaiocreate]->min_mana;
return;
}
void do_rescue( CHAR_DATA *ch, char *argument )
{
char arg[MAX_INPUT_LENGTH];
CHAR_DATA *victim;
CHAR_DATA *fch;
int percent;
if ( IS_NPC(ch) && IS_AFFECTED( ch, AFF_CHARM ) )
{
send_to_char( "You can't concentrate enough for that.\n\r", ch );
return;
}
if ( IS_AFFECTED( ch, AFF_BERSERK ) )
{
send_to_char( "You aren't thinking clearly...\n\r", ch );
return;
}
one_argument( argument, arg );
if ( arg[0] == '\0' )
{
send_to_char( "Rescue whom?\n\r", ch );
return;
}
if ( ( victim = get_char_room( ch, arg ) ) == NULL )
{
send_to_char( "They aren't here.\n\r", ch );
return;
}
if ( victim == ch )
{
send_to_char( "How about fleeing instead?\n\r", ch );
return;
}
if ( ch->mount )
{
send_to_char( "You can't do that while mounted.\n\r", ch );
return;
}
if ( !IS_NPC(ch) && IS_NPC(victim) )
{
send_to_char( "They don't need your help!\n\r", ch );
return;
}
if ( !ch->fighting )
{
send_to_char( "Too late...\n\r", ch );
return;
}
if ( ( fch = who_fighting( victim) ) == NULL )
{
send_to_char( "They are not fighting right now.\n\r", ch );
return;
}
if ( who_fighting( victim ) == ch )
{
send_to_char( "Just running away would be better...\n\r", ch );
return;
}
if ( IS_AFFECTED( victim, AFF_BERSERK ) )
{
send_to_char( "Stepping in front of a berserker would not be an intelligent decision.\n\r", ch );
return;
}
percent = number_percent( ) - (get_curr_lck(ch) - 14)
- (get_curr_lck(victim) - 16);
WAIT_STATE( ch, skill_table[gsn_rescue]->beats );
if (!can_use_skill( ch, percent, gsn_rescue ) )
{
send_to_char( "You fail the rescue.\n\r", ch );
act( AT_SKILL, "$n tries to rescue you!", ch, NULL, victim, TO_VICT );
act( AT_SKILL, "$n tries to rescue $N!", ch, NULL, victim, TO_NOTVICT );
learn_from_failure( ch, gsn_rescue );
return;
}
act( AT_SKILL, "You rescue $N!", ch, NULL, victim, TO_CHAR );
act( AT_SKILL, "$n rescues you!", ch, NULL, victim, TO_VICT );
act( AT_SKILL, "$n moves in front of $N!", ch, NULL, victim, TO_NOTVICT );
learn_from_success( ch, gsn_rescue );
adjust_favor( ch, 8, 1 );
stop_fighting( fch, FALSE );
stop_fighting( victim, FALSE );
if ( ch->fighting )
stop_fighting( ch, FALSE );
set_fighting( ch, fch );
set_fighting( fch, ch );
return;
}
void do_kick( CHAR_DATA *ch, char *argument )
{
CHAR_DATA *victim;
if( IS_NPC(ch) && is_split(ch) )
{
if( !ch->master )
return;
if( !can_use_skill( ch->master, number_percent(), gsn_kick ))
return;
}
if ( IS_NPC(ch) && IS_AFFECTED( ch, AFF_CHARM ) )
{
send_to_char( "You can't concentrate enough for that.\n\r", ch );
return;
}
if ( !IS_NPC(ch)
&& ch->exp < skill_table[gsn_kick]->skill_level[ch->class] )
{
send_to_char(
"You better leave the martial arts to fighters.\n\r", ch );
return;
}
if ( ( victim = who_fighting( ch ) ) == NULL )
{
send_to_char( "You aren't fighting anyone.\n\r", ch );
return;
}
if ( ch->mana < skill_table[gsn_kick]->min_mana )
{
send_to_char( "You don't have enough energy.\n\r", ch );
return;
}
if (ch->focus < skill_table[gsn_kick]->focus)
{
send_to_char( "You need to focus more.\n\r", ch );
return;
}
else
ch->focus -= skill_table[gsn_kick]->focus;
WAIT_STATE( ch, skill_table[gsn_kick]->beats );
if ( can_use_skill(ch, number_percent(),gsn_kick ) )
{
learn_from_success( ch, gsn_kick );
ch->melee = TRUE;
global_retcode = damage( ch, victim, (get_attmod(ch, victim) * number_range( 2, 4 )), gsn_kick );
ch->melee = FALSE;
}
else
{
learn_from_failure( ch, gsn_kick );
ch->melee = TRUE;
global_retcode = damage( ch, victim, 0, gsn_kick );
ch->melee = FALSE;
}
if( !is_android_h(ch) )
ch->mana -= skill_table[gsn_kick]->min_mana;
return;
}
void do_punch( CHAR_DATA *ch, char *argument )
{
CHAR_DATA *victim;
if( IS_NPC(ch) && is_split(ch) )
{
if( !ch->master )
return;
if( !can_use_skill( ch->master, number_percent(), gsn_punch ))
return;
}
if ( IS_NPC(ch) && IS_AFFECTED( ch, AFF_CHARM ) )
{
send_to_char( "You can't concentrate enough for that.\n\r", ch );
return;
}
if ( !IS_NPC(ch)
&& ch->exp < skill_table[gsn_punch]->skill_level[ch->class] )
{
send_to_char(
"You better leave the martial arts to fighters.\n\r", ch );
return;
}
if ( ( victim = who_fighting( ch ) ) == NULL )
{
send_to_char( "You aren't fighting anyone.\n\r", ch );
return;
}
if ( ch->mana < skill_table[gsn_punch]->min_mana )
{
send_to_char( "You don't have enough energy.\n\r", ch );
return;
}
if (ch->focus < skill_table[gsn_punch]->focus)
{
send_to_char( "You need to focus more.\n\r", ch );
return;
}
else
ch->focus -= skill_table[gsn_punch]->focus;
WAIT_STATE( ch, skill_table[gsn_punch]->beats );
if ( can_use_skill( ch, number_percent(), gsn_punch ) )
{
learn_from_success( ch, gsn_punch );
ch->melee = TRUE;
global_retcode = damage( ch, victim, (get_attmod(ch,victim) * number_range( 1, 3 )), gsn_punch );
ch->melee = FALSE;
}
else
{
learn_from_failure( ch, gsn_punch );
ch->melee = TRUE;
global_retcode = damage( ch, victim, 0, gsn_punch );
ch->melee = FALSE;
}
if( !is_android_h(ch) )
ch->mana -= skill_table[gsn_punch]->min_mana;
return;
}
void do_kaioken( CHAR_DATA *ch, char *argument )
{
int arg = 1;
long double max = 0.0;
int strMod=0, spdMod=0, intMod=0, conMod=0;
char buf[MAX_STRING_LENGTH];
arg = atoi(argument);
if( IS_NPC(ch) && is_split(ch) )
{
if( !ch->master )
return;
if( !can_use_skill( ch->master, number_percent(), gsn_kaioken))
return;
}
if( wearing_chip(ch) )
{
ch_printf(ch,"You can't while you have a chip installed.\n\r");
return;
}
if (xIS_SET((ch)->affected_by, AFF_SSJ)
|| xIS_SET((ch)->affected_by, AFF_SSJ2)
|| xIS_SET((ch)->affected_by, AFF_SSJ3)
|| xIS_SET((ch)->affected_by, AFF_SSJ4))
{
send_to_char( "You can't use kaioken if you are a Super Saiyan.\n\r", ch );
return;
}
if (xIS_SET((ch)->affected_by, AFF_OOZARU) ||
xIS_SET((ch)->affected_by, AFF_GOLDEN_OOZARU))
{
send_to_char( "You can't use kaioken while you are an Oozaru.\n\r", ch );
return;
}
if (xIS_SET((ch)->affected_by, AFF_EXTREME))
{
send_to_char( "You can't use kaioken while using the 'Extreme Technique'.\n\r", ch );
return;
}
if (xIS_SET((ch)->affected_by, AFF_HYPER))
{
send_to_char( "You can't use kaioken while you are using the Hyper technique.\n\r", ch );
return;
}
transStatRemove(ch);
if (xIS_SET((ch)->affected_by, AFF_KAIOKEN))
{
send_to_char( "You power down and return to normal.\n\r", ch );
xREMOVE_BIT((ch)->affected_by, AFF_KAIOKEN);
if (xIS_SET((ch)->affected_by, AFF_HEART))
xREMOVE_BIT(ch->affected_by, AFF_HEART);
ch->pl = ch->exp;
heart_calc(ch, "");
return;
}
if (arg <= 1) {
act( AT_SKILL, "Isn't it kind of pointless to do Kaioken times 1?", ch, NULL, NULL, TO_CHAR );
return;
}
max = (ch->exp / 1000000) + 3;
if (arg > max)
{
act( AT_SKILL, "Your body can't sustain that level of Kaioken.", ch, NULL, NULL, TO_CHAR );
return;
}
if (arg > 10 && !is_kaio(ch) )
{
act( AT_SKILL, "Kaioken can't go beyond 10 times.", ch, NULL, NULL, TO_CHAR );
return;
}
else if (arg > 14 && is_kaio(ch) )
{
act( AT_SKILL, "Kaioken can't go beyond 14 times.", ch, NULL, NULL, TO_CHAR );
return;
}
WAIT_STATE( ch, skill_table[gsn_kaioken]->beats );
if ( can_use_skill(ch, number_percent(), gsn_kaioken ) )
{
sprintf( buf, "Bright red flames erupt around you as you yell out KAIOKEN TIMES %d!!!", arg );
act( AT_FIRE, buf, ch, NULL, NULL, TO_CHAR );
if( IS_NPC(ch) )
sprintf( buf, "Bright red flames erupt around %s as $e yells out KAIOKEN TIMES %d!!!", ch->short_descr, arg );
else
sprintf( buf, "Bright red flames erupt around %s as $e yells out KAIOKEN TIMES %d!!!", ch->name, arg );
act( AT_FIRE, buf, ch, NULL, NULL, TO_NOTVICT );
xSET_BIT( (ch)->affected_by, AFF_KAIOKEN );
if (xIS_SET((ch)->affected_by, AFF_HEART))
xREMOVE_BIT(ch->affected_by, AFF_HEART);
ch->pl = ch->exp * arg;
heart_calc(ch, "");
learn_from_success( ch, gsn_kaioken );
switch( arg )
{
case 2:
strMod = 4;
spdMod = 6;
intMod = 0;
conMod = -1;
break;
case 3:
strMod = 6;
spdMod = 8;
intMod = 0;
conMod = -2;
break;
case 4:
strMod = 8;
spdMod = 11;
intMod = 1;
conMod = -3;
break;
case 5:
strMod = 10;
spdMod = 13;
intMod = 1;
conMod = -3;
break;
case 6:
strMod = 12;
spdMod = 16;
intMod = 2;
conMod = -4;
break;
case 7:
strMod = 14;
spdMod = 18;
intMod = 2;
conMod = -4;
break;
case 8:
strMod = 16;
spdMod = 20;
intMod = 3;
conMod = -5;
break;
case 9:
strMod = 18;
spdMod = 22;
intMod = 3;
conMod = -5;
break;
case 10:
strMod = 20;
spdMod = 24;
intMod = 4;
conMod = -6;
break;
case 11:
strMod = 22;
spdMod = 26;
intMod = 5;
conMod = -7;
break;
case 12:
strMod = 24;
spdMod = 28;
intMod = 6;
conMod = -8;
break;
case 13:
strMod = 26;
spdMod = 30;
intMod = 7;
conMod = -9;
break;
case 14:
strMod = 28;
spdMod = 32;
intMod = 8;
conMod = -10;
break;
}
transStatApply(ch, strMod, spdMod, intMod, conMod);
}
else
{
sprintf( buf, "You yell out KAIOKEN TIMES %d!!! Red flames flicker around your body, but quickly fade away.", arg );
act( AT_FIRE, buf, ch, NULL, NULL, TO_CHAR );
sprintf( buf, "%s yells out KAIOKEN TIMES %d!!! Red flames flicker around $s body, but quickly fade away.", ch->name, arg );
act( AT_FIRE, buf, ch, NULL, NULL, TO_NOTVICT );
learn_from_failure( ch, gsn_kaioken );
}
return;
}
void do_ssj( CHAR_DATA *ch, char *argument )
{
if( IS_NPC(ch) && is_split(ch) )
{
if( !ch->master )
return;
if( !can_use_skill( ch->master, number_percent(), gsn_ssj ))
return;
}
if( !IS_NPC(ch) )
{
if( IS_SET(ch->pcdata->flags, PCFLAG_KNOWSMYSTIC) )
{
ch_printf(ch,"You are unable to call upon those powers while you know mystic.\n\r");
return;
}
}
if( wearing_chip(ch) )
{
ch_printf(ch,"You can't while you have a chip installed.\n\r");
return;
}
if (xIS_SET((ch)->affected_by, AFF_KAIOKEN))
{
send_to_char( "You can't transform in to a super saiyan while using kaioken.\n\r", ch );
return;
}
if (xIS_SET((ch)->affected_by, AFF_SSJ)
|| xIS_SET((ch)->affected_by, AFF_SSJ2)
|| xIS_SET((ch)->affected_by, AFF_SSJ3)
|| xIS_SET((ch)->affected_by, AFF_SSJ4))
{
send_to_char( "You power down and return to normal.\n\r", ch );
if (xIS_SET((ch)->affected_by, AFF_USSJ))
xREMOVE_BIT((ch)->affected_by, AFF_USSJ);
if (xIS_SET((ch)->affected_by, AFF_USSJ2))
xREMOVE_BIT((ch)->affected_by, AFF_USSJ2);
if (xIS_SET((ch)->affected_by, AFF_SSJ))
xREMOVE_BIT((ch)->affected_by, AFF_SSJ);
if (xIS_SET((ch)->affected_by, AFF_SSJ2))
xREMOVE_BIT((ch)->affected_by, AFF_SSJ2);
if (xIS_SET((ch)->affected_by, AFF_SSJ3))
xREMOVE_BIT((ch)->affected_by, AFF_SSJ3);
if (xIS_SET((ch)->affected_by, AFF_SSJ4))
xREMOVE_BIT((ch)->affected_by, AFF_SSJ4);
ch->pl = ch->exp;
transStatRemove(ch);
if( !IS_NPC( ch ) )
{
ch->pcdata->haircolor = ch->pcdata->orignalhaircolor;
ch->pcdata->eyes = ch->pcdata->orignaleyes;
}
return;
}
if (xIS_SET((ch)->affected_by, AFF_OOZARU)
|| xIS_SET((ch)->affected_by, AFF_GOLDEN_OOZARU) )
{
send_to_char( "You can't transform while you are an Oozaru.\n\r", ch );
return;
}
if ( ch->mana < skill_table[gsn_ssj]->min_mana )
{
send_to_char( "You don't have enough energy.\n\r", ch );
return;
}
WAIT_STATE( ch, skill_table[gsn_ssj]->beats );
if ( can_use_skill(ch, number_percent(), gsn_ssj ) )
{
act( AT_YELLOW, "Your hair flashes blonde and your eyes turn blue as a fiery aura erupts around you.", ch, NULL, NULL, TO_CHAR );
act( AT_YELLOW, "$n's hair flashes blonde and $s eyes turn blue as a fiery aura erupts around $m.", ch, NULL, NULL, TO_NOTVICT );
xSET_BIT( (ch)->affected_by, AFF_SSJ );
ch->pl = ch->exp * 10;
transStatApply(ch, 10, 5, 3, 5);
learn_from_success( ch, gsn_ssj );
if( !IS_NPC( ch ) )
{
ch->pcdata->eyes = 0;
ch->pcdata->haircolor = 3;
}
}
else
{
switch (number_range(1, 3))
{
default:
act( AT_BLUE, "Your hair flashes blonde, but quickly returns to normal.", ch, NULL, NULL, TO_CHAR );
act( AT_BLUE, "$n's hair flashes blonde, but quickly returns to normal.", ch, NULL, NULL, TO_NOTVICT );
break;
case 1:
act( AT_BLUE, "Your hair flashes blonde, but quickly returns to normal.", ch, NULL, NULL, TO_CHAR );
act( AT_BLUE, "$n's hair flashes blonde, but quickly returns to normal.", ch, NULL, NULL, TO_NOTVICT );
break;
case 2:
act( AT_BLUE, "You, a super Saiyan? I don't think so.", ch, NULL, NULL, TO_CHAR );
break;
case 3:
act( AT_BLUE, "You almost pop a vein trying to transform in to a super Saiyan.", ch, NULL, NULL, TO_CHAR );
act( AT_BLUE, "$n almost pops a vein trying to transform in to a super Saiyan", ch, NULL, NULL, TO_NOTVICT );
break;
}
learn_from_failure( ch, gsn_ssj );
}
ch->mana -= skill_table[gsn_ssj]->min_mana;
return;
}
void do_ssj2( CHAR_DATA *ch, char *argument )
{
if( IS_NPC(ch) && is_split(ch) )
{
if( !ch->master )
return;
if( !can_use_skill( ch->master, number_percent(), gsn_ssj2 ))
return;
}
if( !IS_NPC(ch) )
{
if( IS_SET(ch->pcdata->flags, PCFLAG_KNOWSMYSTIC) )
{
ch_printf(ch,"You are unable to call upon those powers while you know mystic.\n\r");
return;
}
}
if( wearing_chip(ch) )
{
ch_printf(ch,"You can't while you have a chip installed.\n\r");
return;
}
if (xIS_SET((ch)->affected_by, AFF_KAIOKEN))
{
send_to_char( "You can't transform in to a super saiyan while using kaioken.\n\r", ch );
return;
}
if( xIS_SET( (ch)->affected_by, AFF_USSJ )
|| xIS_SET( (ch)->affected_by, AFF_USSJ2 ) )
{
send_to_char( "You have to power out of USSJ to do this.\n\r", ch );
return;
}
if (xIS_SET((ch)->affected_by, AFF_SSJ2))
{
send_to_char( "You power down to super Saiyan 1.\n\r", ch );
xREMOVE_BIT((ch)->affected_by, AFF_SSJ2);
if( xIS_SET((ch)->affected_by, AFF_SSJ3) )
{
xREMOVE_BIT( (ch)->affected_by, AFF_SSJ3 );
}
if( xIS_SET((ch)->affected_by, AFF_SSJ4) )
{
xREMOVE_BIT( (ch)->affected_by, AFF_SSJ4 );
}
ch->pl = ch->exp * 10;
transStatApply(ch, 10, 5, 3, 5);
if( !IS_NPC( ch ) )
{
ch->pcdata->eyes = 0;
ch->pcdata->haircolor = 3;
}
return;
}
if (xIS_SET((ch)->affected_by, AFF_OOZARU) ||
xIS_SET((ch)->affected_by, AFF_GOLDEN_OOZARU))
{
send_to_char( "You can't transform while you are an Oozaru.\n\r", ch );
return;
}
if (!xIS_SET((ch)->affected_by, AFF_SSJ))
{
if ( ch->mana < skill_table[gsn_ssj2]->min_mana * 1.5)
{
send_to_char( "You don't have enough energy.\n\r", ch );
return;
}
WAIT_STATE( ch, skill_table[gsn_ssj2]->beats );
if ( can_use_skill(ch, number_percent(), gsn_ssj2 ) )
{
act( AT_YELLOW, "Your hair flashes blonde, standing up in a mass of spikes. "
"Your eyes turn blue as a fiery aura bursts into existence around you, "
"quickly becoming charged with sheets of electricity.", ch, NULL, NULL, TO_CHAR );
act( AT_YELLOW, "$n's hair flashes blonde, standing up in a mass of spikes. "
"$n's eyes turn blue as a fiery aura bursts into existence around $m, "
"quickly becoming charged with sheets of electricity.", ch, NULL, NULL, TO_NOTVICT );
xSET_BIT( (ch)->affected_by, AFF_SSJ );
xSET_BIT( (ch)->affected_by, AFF_SSJ2 );
ch->pl = ch->exp * 16;
transStatApply(ch, 16, 8, 4, 8);
learn_from_success( ch, gsn_ssj2 );
if( !IS_NPC( ch ) )
{
ch->pcdata->eyes = 0;
ch->pcdata->haircolor = 3;
}
}
else
{
switch (number_range(1, 2))
{
default:
act( AT_BLUE, "Electricity begins arcing around your body, but it quickly disappears.", ch, NULL, NULL, TO_CHAR );
act( AT_BLUE, "Electricity begins arcing around $n's body, but it quickly disappears.", ch, NULL, NULL, TO_NOTVICT );
break;
case 1:
act( AT_BLUE, "Your hair flashes blonde and starts to spike up, but quickly returns to normal.", ch, NULL, NULL, TO_CHAR );
act( AT_BLUE, "$n's hair flashes blonde and starts to spike up, but quickly returns to normal.", ch, NULL, NULL, TO_NOTVICT );
break;
case 2:
act( AT_BLUE, "You almost pop a vein trying to transform in to a super saiyan 2.", ch, NULL, NULL, TO_CHAR );
act( AT_BLUE, "$n almost pops a vein trying to transform in to a super saiyan 2.", ch, NULL, NULL, TO_NOTVICT );
break;
}
learn_from_failure( ch, gsn_ssj2 );
}
ch->mana -= skill_table[gsn_ssj2]->min_mana * 1.5;
return;
}
if ( ch->mana < skill_table[gsn_ssj2]->min_mana )
{
send_to_char( "You don't have enough energy.\n\r", ch );
return;
}
WAIT_STATE( ch, skill_table[gsn_ssj2]->beats );
if ( can_use_skill(ch, number_percent(), gsn_ssj2 ) )
{
// act( AT_YELLOW, "Your hair flies back and electricity arcs around you as your aura flares brightly.", ch, NULL, NULL, TO_CHAR );
// act( AT_YELLOW, "$n's hair flies back and electricity arcs around $m as $s aura flares brightly.", ch, NULL, NULL, TO_NOTVICT );
act( AT_YELLOW, "Your hair straightens and stands more on end, your aura flaring as "
"electricity arcs around you.", ch, NULL, NULL, TO_CHAR );
act( AT_YELLOW, "$n's hair straightens and stands more on end, $s aura flaring as "
"electricity arcs around $m.", ch, NULL, NULL, TO_NOTVICT );
xSET_BIT( (ch)->affected_by, AFF_SSJ2 );
ch->pl = ch->exp * 16;
transStatApply(ch, 16, 8, 4, 8);
learn_from_success( ch, gsn_ssj2 );
if( !IS_NPC( ch ) )
{
ch->pcdata->eyes = 0;
ch->pcdata->haircolor = 3;
}
}
else
{
switch (number_range(1, 2))
{
default:
act( AT_BLUE, "Electricity begins arcing around your body, but it quickly disappears.", ch, NULL, NULL, TO_CHAR );
act( AT_BLUE, "Electricity begins arcing around $n's body, but it quickly disappears.", ch, NULL, NULL, TO_NOTVICT );
break;
case 1:
act( AT_BLUE, "Electricity begins arcing around your body, but it quickly disappears.", ch, NULL, NULL, TO_CHAR );
act( AT_BLUE, "Electricity begins arcing around $n's body, but it quickly disappears.", ch, NULL, NULL, TO_NOTVICT );
break;
case 2:
act( AT_BLUE, "You almost pop a vein trying to transform in to a super Saiyan 2.", ch, NULL, NULL, TO_CHAR );
act( AT_BLUE, "$n almost pops a vein trying to transform in to a super Saiyan 2.", ch, NULL, NULL, TO_NOTVICT );
break;
}
learn_from_failure( ch, gsn_ssj2 );
}
ch->mana -= skill_table[gsn_ssj2]->min_mana;
return;
}
void do_ssj3( CHAR_DATA *ch, char *argument )
{
if( IS_NPC(ch) && is_split(ch) )
{
if( !ch->master )
return;
if( !can_use_skill( ch->master, number_percent(), gsn_ssj3 ))
return;
}
if( !IS_NPC(ch) )
{
if( IS_SET(ch->pcdata->flags, PCFLAG_KNOWSMYSTIC) )
{
ch_printf(ch,"You are unable to call upon those powers while you know mystic.\n\r");
return;
}
}
if( wearing_chip(ch) )
{
ch_printf(ch,"You can't while you have a chip installed.\n\r");
return;
}
if (xIS_SET((ch)->affected_by, AFF_KAIOKEN))
{
send_to_char( "You can't transform in to a super saiyan while using kaioken.\n\r", ch );
return;
}
if( xIS_SET( (ch)->affected_by, AFF_USSJ )
|| xIS_SET( (ch)->affected_by, AFF_USSJ2 ) )
{
send_to_char( "You have to power out of USSJ to do this.\n\r", ch );
return;
}
if (xIS_SET((ch)->affected_by, AFF_SSJ3))
{
send_to_char( "You power down to super Saiyan 2.\n\r", ch );
xREMOVE_BIT((ch)->affected_by, AFF_SSJ3);
if( xIS_SET( (ch)->affected_by, AFF_SSJ4) )
{
xREMOVE_BIT( (ch)->affected_by, AFF_SSJ4 );
}
ch->pl = ch->exp * 16;
transStatApply(ch, 16, 8, 4, 8);
if( !IS_NPC( ch ) )
{
ch->pcdata->eyes = 0;
ch->pcdata->haircolor = 3;
}
return;
}
if (xIS_SET((ch)->affected_by, AFF_OOZARU) ||
xIS_SET((ch)->affected_by, AFF_GOLDEN_OOZARU))
{
send_to_char( "You can't transform while you are an Oozaru.\n\r", ch );
return;
}
if (!xIS_SET((ch)->affected_by, AFF_SSJ2))
{
if ( ch->mana < skill_table[gsn_ssj3]->min_mana * 2)
{
send_to_char( "You don't have enough energy.\n\r", ch );
return;
}
WAIT_STATE( ch, skill_table[gsn_ssj3]->beats );
if ( can_use_skill(ch, number_percent(), gsn_ssj3 ) )
{
act( AT_YELLOW, "A brilliant golden aura explodes around you as your hair suddenly flashes a similar color. "
"It flows rapidly down your back as your eyebrows disappear.", ch, NULL, NULL, TO_CHAR );
act( AT_YELLOW, "A brilliant golden aura explodes aShowing the first 100 KB of 376.1 KB. Download the archive for the full file.