void lightning( void ) { DESCRIPTOR_DATA *d; for ( d = descriptor_list; d != NULL; d = d->next ) { if ( d->connected == CON_PLAYING && IS_OUTDOORS( d->character ) && IS_AWAKE ( d->character ) && number_chance(10) && !IS_IMMORTAL(d->character) && d->character->level > 17 && weather_info.sky == SKY_LIGHTNING ) { send_to_char("{x{RYou see a brilliant flash come down from the sky and then black out!{x\n\r",d->character); act( "$n has been struck by lightning!", d->character, NULL, NULL,TO_ROOM); if(check_immune(d->character,DAM_LIGHTNING) != IS_IMMUNE) { if(d->character->fighting) { stop_fighting(d->character,TRUE); } if(check_immune(d->character,DAM_LIGHTNING) != IS_RESISTANT) if (d->character->level < LI1); d->character->hit -= d->character->hit/25; if (d->character->level < LI2); d->character->hit -= d->character->hit/20; if (d->character->level < LI3); d->character->hit -= d->character->hit/15; WAIT_STATE(d->character,40); } else { if(check_immune(d->character,DAM_LIGHTNING) == IS_VULNERABLE) { d->character->hit -= d->character->hit/10; WAIT_STATE(d->character,40); } } } } }
void soul_sword (CHAR_DATA *ch) { //Soul Sword can rarely kill victims outright, and does 1 dmg, and is VERY unlikely to hit. UNGODLY Expensive CHAR_DATA *victim; OBJ_DATA *katana; char buf[MAX_STRING_LENGTH]; int thebonus = 0; if (IS_NPC(ch)) return; katana = get_eq_char(ch, WEAR_WIELD); if ((victim = ch->fighting) == NULL) { send_to_char("You find no need for this now.\n\r",ch); return; } if (IS_NPC(victim)) thebonus = 45; else thebonus = 7; if (ch->mana < 30000) { send_to_char("You have not the 30000 mana power to use this.\n\r",ch); return; } if ((katana == NULL) || (katana->pIndexData->vnum != 33176)) { send_to_char("Without a proper katana the energy will destroy your weapon.\n\r",ch); return; } ch->mana -= 30000; send_to_char("You channel mystical energy into your katana.\n\r",ch); do_say(ch,"#0SOUL #nSWORD!"); act("A bolt of light shoots out of your katana and into $N",ch, NULL, victim, TO_CHAR); act("A bolt of light shoots out of $n's katana and into you!", ch, NULL, victim, TO_VICT); act("A bolt of light shoots out of $n's katana and into $N!", ch, NULL, victim, TO_NOTVICT); if (number_range(0,250) > (4 + thebonus)) // Was .5% now it's 5%/20% { act("Your attack was ineffective.", ch, NULL, victim, TO_CHAR); act("$n looks confused as nothing happens.", ch, NULL, NULL, TO_ROOM); multi_hit( ch, victim, TYPE_UNDEFINED ); WAIT_STATE(ch, (PULSE_VIOLENCE * 5)); return; } xprintf(buf,"$N screams as $E is ripped apart by the dark energy. #R[#y#b MORTAL #n#R]#n"); act(buf, ch, NULL, victim, TO_CHAR); xprintf(buf,"$n looks on as you start screaming while dark energy rips you apart from the inside out. #R[#y#b MORTAL #n#R]#n"); act(buf, ch, NULL, victim, TO_VICT); send_to_char("You crumple to the ground.\n\r", victim); act("$n looks on as $N starts screaming. Weakened $N crumples to the ground.", ch, NULL, victim, TO_NOTVICT); WAIT_STATE(ch, (PULSE_VIOLENCE * 5)); victim->hit = -10; hurt_person(ch, victim, 1); return; }
void do_countermove(CHAR_DATA *ch, char *argument) { CHAR_DATA *victim; if (IS_NPC(ch)) return; if (!IS_CLASS(ch, CLASS_SAMURAI)) { send_to_char("Huh?\n\r",ch); return; } if (!IS_SET(ch->pcdata->powers[SAMURAI_MARTIAL], SAM_COUNTERMOVE)) { send_to_char("You need to learn that combo first.\n\r", ch); return; } if (ch->pcdata->powers[SAMURAI_FOCUS] > 40) { send_to_char("You are to exhausted.\n\r",ch); return; } if ((victim = ch->fighting) == NULL) { send_to_char( "You aren't fighting anyone.\n\r", ch ); return; } ch->pcdata->powers[SAMURAI_FOCUS] += 8; act("$n strikes out at $N before $E can even get a weapon out to defend $Mself.",ch,NULL,victim,TO_NOTVICT); act("You cut $N with a lightning fast attack.",ch,NULL,victim,TO_CHAR); act("$n attacks with a flurry of lightning fast attacks, one of them scores a hit.",ch,NULL,victim,TO_VICT); one_hit(ch, victim, gsn_lightningslash, 1); check_samuraiattack(ch, victim); WAIT_STATE(ch, 12); return; }
void do_block(CHAR_DATA *ch, char *argument) { CHAR_DATA *victim; if (IS_NPC(ch)) return; if (!IS_CLASS(ch, CLASS_SAMURAI)) { send_to_char("Huh?\n\r",ch); return; } if (!IS_SET(ch->pcdata->powers[SAMURAI_MARTIAL], SAM_BLOCK)) { send_to_char("You need to learn that combo first.\n\r", ch); return; } if (ch->pcdata->powers[SAMURAI_FOCUS] > 40) { send_to_char("You are to exhausted.\n\r",ch); return; } if ((victim = ch->fighting) == NULL) { send_to_char( "You aren't fighting anyone.\n\r", ch ); return; } ch->pcdata->powers[SAMURAI_FOCUS] += 4; act("$n blocks $N's simpleminded attack and strikes back with a perfect attack.",ch,NULL,victim,TO_NOTVICT); act("You block $N's simple attack and return with one of your own design.",ch,NULL,victim,TO_CHAR); act("$n blocks your attack, and strikes back before you get a chance to react.",ch,NULL,victim,TO_VICT); one_hit(ch, victim, gsn_lightningslash, 1); check_samuraiattack(ch, victim); WAIT_STATE(ch, 12); return; }
void do_sidestep(CHAR_DATA *ch, char *argument) { CHAR_DATA *victim; if (IS_NPC(ch)) return; if (!IS_CLASS(ch, CLASS_SAMURAI)) { send_to_char("Huh?\n\r",ch); return; } if (!IS_SET(ch->pcdata->powers[SAMURAI_MARTIAL], SAM_SIDESTEP)) { send_to_char("You need to learn that combo first.\n\r", ch); return; } if (ch->pcdata->powers[SAMURAI_FOCUS] > 40) { send_to_char("You are to exhausted.\n\r",ch); return; } if ((victim = ch->fighting) == NULL) { send_to_char( "You aren't fighting anyone.\n\r", ch ); return; } ch->pcdata->powers[SAMURAI_FOCUS] += 2; act("$n sidesteps $N's attack and scores a hit.",ch,NULL,victim,TO_NOTVICT); act("You sidestep $N's attack, and scores a counterattack before $E can react.",ch,NULL,victim,TO_CHAR); act("$n sidesteps your feeble attempt to get near $m and strikes back at you.",ch,NULL,victim,TO_VICT); one_hit(ch, victim, gsn_lightningslash, 1); check_samuraiattack(ch, victim); WAIT_STATE(ch, 12); return; }
void do_slide(CHAR_DATA *ch, char *argument) { CHAR_DATA *victim; if (IS_NPC(ch)) return; if (!IS_CLASS(ch, CLASS_SAMURAI)) { send_to_char("Huh?\n\r",ch); return; } if (!IS_SET(ch->pcdata->powers[SAMURAI_MARTIAL], SAM_SLIDE)) { send_to_char("You need to learn that combo first.\n\r", ch); return; } if (ch->pcdata->powers[SAMURAI_FOCUS] > 40) { send_to_char("You are to exhausted.\n\r",ch); return; } if ((victim = ch->fighting) == NULL) { send_to_char( "You aren't fighting anyone.\n\r", ch ); return; } ch->pcdata->powers[SAMURAI_FOCUS] += 1; act("$n slides into a better fighting position, hitting $N while $e passes.",ch,NULL,victim,TO_NOTVICT); act("You slide into a better fighting position, hitting $N while you pass $E.",ch,NULL,victim,TO_CHAR); act("$n moves past you, lightning fast and strikes you before you can react.",ch,NULL,victim,TO_VICT); one_hit(ch, victim, gsn_lightningslash, 1); check_samuraiattack(ch, victim); WAIT_STATE(ch, 12); return; }
void do_confuse(CHAR_DATA *ch, char *argument) { CHAR_DATA *victim; if (IS_NPC(ch)) return; if (!IS_CLASS(ch, CLASS_DROW) || !IS_SET(ch->pcdata->powers[1], DPOWER_CONFUSE)) { send_to_char("Huh?\n\r", ch); return;} if ((victim = ch->fighting) == NULL) { send_to_char("You are not fighting anyone.\n\r", ch); return;} if (ch->move < 75) { send_to_char("You need 75 move to confuse your opponent.\n\r",ch); return;} act("$n attempts to confuse you.",ch,NULL,victim,TO_VICT); act("You attempt to confuse $N.",ch,NULL,victim,TO_CHAR); act("$n attempts to confuse $N.",ch,NULL,victim,TO_NOTVICT); ch->move -=75; if ( number_percent() > 25 ) { send_to_char("You failed.\n\r", ch ); return;} else { do_flee(victim,""); WAIT_STATE(ch, 16); return; } return; }
void do_pummel( CHAR_DATA *ch, char *argument ) { CHAR_DATA *victim; if (IS_NPC(ch)) return; if (!IS_CLASS(ch, CLASS_SKYBLADE) ) { send_to_char("Huh?\n\r",ch); return; } if (ch->pcdata->powers[SKYBLADE_SKILLS] < 2) { send_to_char("You haven't mastered the skills abilities enough.\n\r",ch); return; } if (!TIME_UP(ch, TIMER_PUMMEL)) { send_to_char("You are too tired from the last time.\n\r",ch); return; } if ((victim = ch->fighting) == NULL) { send_to_char("You aren't fighting anyone though.\n\r",ch); return; } if (IS_NPC(victim)) { send_to_char("They aren't stanced though.\n\r",ch); return; } SET_TIMER(ch, TIMER_PUMMEL, 5); do_stance(victim, ""); WAIT_STATE(victim,12); return; }
void do_lavablast(CHAR_DATA *ch, char *argument) { CHAR_DATA *victim; if (IS_NPC(ch)) return; if (!IS_CLASS(ch, CLASS_TANARRI)) { send_to_char("Huh?\n\r",ch); return; } if (!IS_SET(ch->pcdata->powers[TANARRI_POWER], TANARRI_LAVA)) { send_to_char("Perhaps you should learn that power first.\n\r",ch); return; } if (ch->mana < 1000 || ch->move < 1000) { send_to_char("Your not up to it, you ain't got the fire in ya.\n\r",ch); return; } if ((victim = ch->fighting) == NULL) { send_to_char( "You aren't fighting anyone.\n\r", ch ); return; } ch->mana -= 1000; ch->move -= 1000; one_hit(ch,victim,gsn_magma,1); one_hit(ch,victim,gsn_magma,1); one_hit(ch,victim,gsn_magma,1); if (!IS_AFFECTED(victim, AFF_FLAMING)) SET_BIT(victim->affected_by, AFF_FLAMING); WAIT_STATE(ch,18); return; }
void do_houseofgod( CHAR_DATA *ch, char *argument ) { if (IS_NPC(ch)) return; if (!IS_CLASS(ch, CLASS_ANGEL)) { send_to_char("Huh?\n\r",ch); return; } if (ch->pcdata->powers[ANGEL_PEACE] < 5) { send_to_char("Your not peaceful enough.\n\r",ch); return; } if (has_timer(ch)) return; if (ch->pcdata->powers[ANGEL_PEACE_COUNTER] > 0) { send_to_char("It is not the time for peace yet, God wants you to fight.\n\r",ch); return; } ch->pcdata->powers[ANGEL_PEACE_COUNTER] = 50; ch->level = 12; do_peace(ch,""); ch->level = 3; act("You call for God to transfer the pain of these mortals to yourself.", ch, NULL, NULL, TO_CHAR); act("$n says '#yLet not these followers of God suffer, let their pain be mine instead#n'.", ch, NULL, NULL, TO_ROOM); WAIT_STATE(ch, 24); return; }
void do_harmony( CHAR_DATA *ch, char *argument ) { CHAR_DATA *victim; char arg[MAX_INPUT_LENGTH]; int sn, level; argument = one_argument( argument, arg ); if (IS_NPC(ch)) return; if (!IS_CLASS(ch, CLASS_ANGEL)) { send_to_char("Huh?\n\r",ch); return; } if (ch->pcdata->powers[ANGEL_HARMONY] < 5) { send_to_char("Your not in contact with your inner harmonies.\n\r",ch); return; } if ((victim = get_char_room(ch, arg)) == NULL) { send_to_char("They are not here.\n\r", ch); return; } level = number_range(100,200); sn = skill_lookup("spirit kiss"); if (sn > 0) (*skill_table[sn].spell_fun) (sn,level,ch,victim); WAIT_STATE(ch,12); return; }
void do_enrage(CHAR_DATA *ch, char *argument) { char arg[MAX_INPUT_LENGTH]; CHAR_DATA *victim; argument = one_argument( argument, arg ); if (IS_NPC(ch)) return; if (!IS_CLASS(ch, CLASS_TANARRI)) { send_to_char("Huh?\n\r",ch); return; } if (!IS_SET(ch->pcdata->powers[TANARRI_POWER], TANARRI_ENRAGE)) { send_to_char("you don't have that power yet.\n\r",ch); return; } if ((victim = get_char_room(ch, arg)) == NULL) { send_to_char("They are not here.\n\r", ch); return; } if (IS_NPC(victim) || victim->level < 3) { send_to_char("Not on them\n\r",ch); return; } do_say(ch, "Kara, Kara, Xenos!"); if (number_percent() > 40) do_berserk2(victim,""); else send_to_char("#RSomeone is trying to control your actions!!!#n\n\r",victim); WAIT_STATE(ch,18); return; }
void do_chaosblast(CHAR_DATA *ch, char *argument) { CHAR_DATA *victim; char arg [MAX_INPUT_LENGTH]; int sn; int level; int spelltype; argument = one_argument( argument, arg ); if (IS_NPC(ch)) return; if (!IS_CLASS(ch, CLASS_DROW) || (!IS_SET(ch->special, SPC_DROW_MAG) && ch->generation > 2)) { return;} if ( ( victim = get_char_room( ch, arg ) ) == NULL ) if ((victim = ch->fighting) == NULL) { send_to_char( "They aren't here.\n\r", ch ); return; } if (ch->mana < 750) { send_to_char("You don't have enough mana.\n\r", ch); return;} if ( ( sn = skill_lookup( "chaos blast" ) ) < 0 ) return; spelltype = skill_table[sn].target; level = ch->spl[spelltype]/3; act("You concentrate your power on $N.",ch,NULL,victim,TO_CHAR); act("$n concentrates $s power on you.",ch,NULL,victim,TO_VICT); (*skill_table[sn].spell_fun) ( sn, level, ch, victim ); WAIT_STATE( ch, 12 ); ch->mana = ch->mana - 750; return; }
void do_martyr( CHAR_DATA *ch, char *argument ) { CHAR_DATA *ich; if (IS_NPC(ch)) return; if (!IS_CLASS(ch, CLASS_ANGEL)) { send_to_char("Huh?\n\r",ch); return; } if (ch->pcdata->powers[ANGEL_LOVE] < 5) { send_to_char("Your love for mortals are not strong enough.\n\r",ch); return; } if (ch->hit < ch->max_hit) { send_to_char("Your body cannot take the strain.\n\r",ch); return; } if (has_timer(ch)) return; ch->level = 12; act("You call for God to transfer the pain of these mortals to yourself.", ch, NULL, NULL, TO_CHAR); act("$n says '#yLet not these followers of God suffer, let their pain be mine instead#n'.", ch, NULL, NULL, TO_ROOM); for (ich = ch->in_room->people; ich != NULL; ich = ich->next_in_room) if (!IS_NPC(ich)) do_restore(ch,ich->pcdata->switchname); ch->level = 3; ch->hit = 1; ch->move = 1; ch->mana = 1; WAIT_STATE(ch,6); return; }
void do_innerpeace( CHAR_DATA *ch, char *argument ) { if (IS_NPC(ch)) return; if (!IS_CLASS(ch, CLASS_ANGEL)) { send_to_char("Huh?\n\r",ch); return; } if (ch->pcdata->powers[ANGEL_PEACE] < 3) { send_to_char("Your not peaceful enough.\n\r",ch); return; } if (ch->mana < 1500) { send_to_char("You don't have enough mana.\n\r",ch); return; } ch->mana -= 1500; ch->hit += ch->pcdata->powers[ANGEL_PEACE]*500; if (ch->hit > ch->max_hit) ch->hit = ch->max_hit; act("You feel the cleansing love of God run through your veins, filling you with an inner peace.", ch, NULL, NULL, TO_CHAR); act("$n is struck by a ray of pure light, and a blissful smile crosses $s lips.", ch, NULL, NULL, TO_ROOM); WAIT_STATE(ch,18); return; }
void do_michi( CHAR_DATA *ch, char *argument ) { if (IS_NPC(ch)) return; if (!IS_CLASS(ch, CLASS_NINJA) ) { send_to_char("Huh?\n\r", ch); return; } if ( IS_CLASS(ch, CLASS_NINJA) ) { if ( ch->rage >= 100 ) { send_to_char("But you are already in the state of Michi.\n\r",ch); return; } if ( ch->move < 500 ) { send_to_char("But you don't have enough move to perform the michi.\n\r", ch); return; } send_to_char("You are gifted positive energy while performing the michi.\n\r",ch); act("$n is gifted positives energies while performing the michi.",ch,NULL,NULL,TO_ROOM); ch->rage += 100; ch->move -= 500; WAIT_STATE(ch,12); return; } else send_to_char("But you are already in the state of Michi.\n\r",ch); return; }
void do_kick( CHAR_DATA *ch, char *argument ) { CHAR_DATA *victim; if ( !IS_NPC(ch) && !(ch->ability[BRAWL].value > 0) ) { send_to_char("You better leave the martial arts to fighters.\n\r", ch ); return; } if (IS_NPC(ch) && !IS_SET(ch->off_flags,OFF_KICK)) return; if ( ( victim = ch->fighting ) == NULL ) { send_to_char( "You aren't fighting anyone.\n\r", ch ); return; } WAIT_STATE( ch, skill_table[gsn_kick].beats ); if ( get_skill(ch,gsn_kick) > number_percent()) { damage(ch,victim,number_range( 1, get_curr_stat(ch, STAT_STR) + 1 ), gsn_kick,DAM_BASH,TRUE,0,-1); } else { damage( ch, victim, 0, gsn_kick,DAM_BASH,TRUE,0,-1); } return; }
void do_recall (CHAR_DATA * ch, char *argument) { char buf[MAX_STRING_LENGTH]; ROOM_INDEX_DATA *location; if (IS_NPC (ch)) { send_to_char ("Only players can recall.\n\r", ch); return; } act ("$n prays for transportation!", ch, 0, 0, TO_ROOM); if ((location = get_room_index (100)) == NULL) { send_to_char ("You are completely lost.\n\r", ch); return; } if (ch->in_room == location) return; if (IS_SET (ch->in_room->room_flags, ROOM_NO_RECALL)) { send_to_char ("Mota has forsaken you.\n\r", ch); return; } if(ch->infight) { int lose, skill; skill = get_skill (ch, gsn_recall); if (number_percent () < 80 * skill / 100) { WAIT_STATE (ch, 4); sprintf (buf, "You failed!.\n\r"); send_to_char (buf, ch); return; } lose = (ch->desc != NULL) ? 25 : 50; gain_exp (ch, 0 - lose); sprintf (buf, "You recall from combat! You lose %d exps.\n\r", lose); send_to_char (buf, ch); stop_fighting (ch, TRUE); } ch->move /= 2; act ("$n disappears.", ch, NULL, NULL, TO_ROOM); char_from_room (ch); char_to_room (ch, location); act ("$n appears in the room.", ch, NULL, NULL, TO_ROOM); do_function (ch, &do_look, "auto"); return; }
void do_chaosmagic (CHAR_DATA *ch, char *argument) { char arg[MAX_STRING_LENGTH]; CHAR_DATA *victim; int sn, random, level; argument=one_argument(argument,arg); level = ch->spl[RED_MAGIC]/4; if (IS_NPC(ch)) return; if (!IS_CLASS(ch, CLASS_MAGE) && !IS_CLASS(ch, CLASS_LICH)) { send_to_char("Huh?\n\r",ch); return; } if (IS_CLASS(ch, CLASS_LICH) && ch->pcdata->powers[CHAOS_MAGIC] < 1) { send_to_char("Not yet, not yet.\n\r",ch); return; } if (ch->mana < 1500) { send_to_char("You need more mana.\n\r",ch); return; } if (ch->in_room != NULL) { if ( IS_SET(ch->in_room->room_flags,ROOM_SAFE) ) { send_to_char( "You cannot invoke the forces of chaos in a safe room.\n\r", ch ); return; } } if (arg[0] == '\0' && ch->fighting != NULL) victim = ch->fighting; else if ((victim = get_char_room(ch, arg)) == NULL) { send_to_char("They are not here.\n\r", ch ); return; } random = number_range(1,12); if (random == 1) sn = skill_lookup("spirit kiss"); else if (random == 2) sn = skill_lookup("desanct"); else if (random == 3) sn = skill_lookup("imp heal"); else if (random == 4) sn = skill_lookup("imp fireball"); else if (random == 5) sn = skill_lookup("imp faerie fire"); else if (random == 6) sn = skill_lookup("imp teleport"); else if (random == 7) sn = skill_lookup("change sex"); else if (random == 8) sn = skill_lookup("shield"); else if (random == 9) sn = skill_lookup("readaura"); else if (random == 10) sn = skill_lookup("earthquake"); else if (random == 11) sn = skill_lookup("gate"); else if (random == 12) sn = skill_lookup("dispel magic"); else sn = 0; if (sn > 0) (*skill_table[sn].spell_fun) (sn,level,ch,victim); ch->mana -= 1500; WAIT_STATE(ch,6); return; }
void do_krecall(CHAR_DATA * ch, char *argument) { char buf[MAX_STRING_LENGTH]; CHAR_DATA *victim; CHAR_DATA *mount; ROOM_INDEX_DATA *location; KINGDOM_DATA *kingdom; if(IS_NPC(ch) || (kingdom = get_kingdom(ch->pcdata->kingdom)) == &kingdom_default) { send_to_char("You have no kingdom!\n\r", ch); return; } act("$n's body flickers with green energy.", ch, 0, 0, TO_ROOM); act("Your body flickers with green energy.", ch, 0, 0, TO_CHAR); if((location = get_room_index(kingdom->recall)) == 0) { send_to_char("Your kingdom has no recall set.\n\r", ch); return; } if(ch->in_room == location) return; if(IS_SET(ch->in_room->room_flags, ROOM_NO_RECALL) || IS_AFFECTED(ch, AFF_CURSE)) { send_to_char("You are unable to recall.\n\r", ch); return; } if((victim = ch->fighting) != 0) { if(number_bits(1) == 0) { WAIT_STATE(ch, 4); sprintf(buf, "You failed!\n\r"); send_to_char(buf, ch); return; } sprintf(buf, "You recall from combat!\n\r"); send_to_char(buf, ch); stop_fighting(ch, TRUE); } act("$n disappears.", ch, 0, 0, TO_ROOM); char_from_room(ch); char_to_room(ch, location); act("$n appears in the room.", ch, 0, 0, TO_ROOM); do_look(ch, "auto"); if((mount = ch->mount) == 0) return; char_from_room(mount); char_to_room(mount, ch->in_room); return; }
void drain_sword (CHAR_DATA *ch) { //Drain Sword sucks health from a victim, and is moderately likely to hit. Avg Expense, Low Dmg CHAR_DATA *victim; OBJ_DATA *katana; char buf[MAX_STRING_LENGTH]; int dmg; int heal; if (IS_NPC(ch)) return; katana = get_eq_char(ch, WEAR_WIELD); if ((victim = ch->fighting) == NULL) { send_to_char("You find no need for this now.\n\r",ch); return; } if (ch->mana < 4000) { send_to_char("You have not the 4000 mystical power to use this.\n\r",ch); return; } if ((katana == NULL) || (katana->pIndexData->vnum != 33176)) { send_to_char("Without a proper katana the energy will destroy your weapon.\n\r",ch); return; } ch->mana -= 4000; send_to_char("You channel mystical energy into your katana.\n\r",ch); do_say(ch,"#nD#0R#yA#0I#nN #nSWORD!"); send_to_char("A wave of energy launches itself from your katana.\n\r",ch); act("A wave of energy launches itself from $n's katana!", ch, NULL, NULL, TO_ROOM); if (number_range(0,100) < 20) { act("Your wave of energy goes through $N, continues on a bit then fades.", ch, NULL, victim, TO_CHAR); act("The wave of energy goes through you, continues on a bit then fades.", ch, NULL, victim, TO_VICT); act("The wave of energy goes through $N, continues on a bit then fades.", ch, NULL, victim, TO_NOTVICT); return; } dmg = number_range(ch->wpn[1], ch->wpn[1] * 2); heal = number_range(dmg / 3, dmg / 2); xprintf(buf,"Your wave of energy enters $N's body and drains %d health painfully from $N. #R[#R#b %d #n#R]#n", heal, dmg); act(buf, ch, NULL, victim, TO_CHAR); xprintf(buf,"$n's wave of energy enters your body and drains you painfully. #R[#R#b %d #n#R]#n", dmg); act(buf, ch, NULL, victim, TO_VICT); act("$n's wave of energy enters $N's body causing $N to look weak.", ch, NULL, victim, TO_NOTVICT); hurt_person(ch, victim, dmg); ch->hit += heal; if (ch->hit > ch->max_hit) ch->hit = ch->max_hit; WAIT_STATE(ch, (PULSE_VIOLENCE * 3)); return; }
void lightning_sword (CHAR_DATA *ch) { //Lightning Stuns Victim and is fairly likely to hit, Avg Expense, Avg Damage CHAR_DATA *victim; OBJ_DATA *katana; char buf[MAX_STRING_LENGTH]; int dmg; if (IS_NPC(ch)) return; katana = get_eq_char(ch, WEAR_WIELD); if ((victim = ch->fighting) == NULL) { send_to_char("You find no need for this now.\n\r",ch); return; } if (ch->mana < 2500) { send_to_char("You have not the 2500 mana to use this.\n\r",ch); return; } if ((katana == NULL) || (katana->pIndexData->vnum != 33176)) { send_to_char("Without a proper katana the energy will destroy your weapon.\n\r",ch); return; } ch->mana -= 2500; send_to_char("You channel mystical energy into your katana.\n\r",ch); do_say(ch,"#b#cL#CI#cG#CH#cT#CN#cI#CN#cG #nSWORD!"); send_to_char("A humongous bolt of lightning blasts from your katana.\n\r",ch); act("A humongous bolt of lightning blasts from $n's katana!", ch, NULL, NULL, TO_ROOM); if (number_range(0,100) < 16) { act("Your lightning blast flies past $N and is absorbed by the ground.", ch, NULL, victim, TO_CHAR); act("The lightning blast slams into the ground and is absorbed.", ch, NULL, NULL, TO_ROOM); return; } dmg = number_range(ch->wpn[1], ch->wpn[1] * 3); xprintf(buf,"Your lightning blast slams into $N's and crackles around $S body sending them sprawling. #R[#C#b %d #n#R]#n", dmg); act(buf, ch, NULL, victim, TO_CHAR); xprintf(buf,"$n's lightning blast slams into you and crackles around your body sending you sprawling. #R[#C#b %d #n#R]#n", dmg); act(buf, ch, NULL, victim, TO_VICT); act("$n's lightning blast slams into $N's and crackles around $S body sending $N sprawling.", ch, NULL, victim, TO_NOTVICT); hurt_person(ch, victim, dmg); WAIT_STATE(ch, (PULSE_VIOLENCE * 3)); if (victim->position > POS_STUNNED) victim->position = POS_STUNNED; return; }
void fire_sword (CHAR_DATA *ch) { //Flame Cone Sword sets victim aflame, and is VERY likely to hit. More Expense, Low Dmg CHAR_DATA *victim; OBJ_DATA *katana; char buf[MAX_STRING_LENGTH]; int dmg; if (IS_NPC(ch)) return; katana = get_eq_char(ch, WEAR_WIELD); if ((victim = ch->fighting) == NULL) { send_to_char("You find no need for this now.\n\r",ch); return; } if (ch->mana < 3500) { send_to_char("You have not the 3500 mystical power to use this.\n\r",ch); return; } if ((katana == NULL) || (katana->pIndexData->vnum != 33176)) { send_to_char("Without a proper katana the energy will destroy your weapon.\n\r",ch); return; } ch->mana -= 3500; send_to_char("You channel mystical energy into your katana.\n\r",ch); do_say(ch,"#rF#RIR#rE #nSWORD!"); send_to_char("A tremendous cone of flame shoots from your katana.\n\r",ch); act("A tremendous cone of flame shoots from $n's katana!", ch, NULL, NULL, TO_ROOM); if (number_range(0,100) < 5) { act("Your cone of flame flashes past $N and scorches the ground.", ch, NULL, victim, TO_CHAR); act("The cone of flame flashes past you and scorches the ground.", ch, NULL, victim, TO_VICT); act("The cone of flame flashes past $N and scorches the ground.", ch, NULL, victim, TO_NOTVICT); return; } dmg = number_range(ch->wpn[1], ch->wpn[1] * 2); xprintf(buf,"Your cone of flame engulfs $N's in a sheet of flame. #R[#R#b %d #n#R]#n", dmg); act(buf, ch, NULL, victim, TO_CHAR); xprintf(buf,"$n's cone of flame engulfs you in a sheet of flame. #R[#R#b %d #n#R]#n", dmg); act(buf, ch, NULL, victim, TO_VICT); act("$n's engulfs $N's in a sheet of flame.", ch, NULL, victim, TO_NOTVICT); hurt_person(ch, victim, dmg); WAIT_STATE(ch, (PULSE_VIOLENCE * 3)); if (!IS_SET(victim->affected_by, AFF_FLAMING)) SET_BIT(victim->affected_by, AFF_FLAMING); return; }
void do_sdelete( CHAR_DATA *ch, char *argument ) { DESCRIPTOR_DATA *d; char strsave[MAX_INPUT_LENGTH]; char arg1[MAX_INPUT_LENGTH]; char *pArg; char cEnd; char buf[MAX_INPUT_LENGTH]; if ( IS_NPC(ch) ) return; strcpy(buf,ch->name); sprintf( strsave, "%s%s%s%s", PLAYER_DIR, initial( buf ), "/", capitalize( buf ) ); pArg = arg1; while ( isspace(*argument) ) argument++; cEnd = ' '; if ( *argument =='\'' || *argument == '"' ) cEnd = *argument++; while ( *argument != '\0' ) { if ( *argument == cEnd ) { argument++; break; } *pArg++ = *argument++; } *pArg = '\0'; if ( ( ch->pcdata->pwd != '\0' ) && ( arg1[0] == '\0' ) ) { send_to_char( "Syntax: pdelete <password>.\n\r", ch ); return; } if ( ( ch->pcdata->pwd != '\0' ) && ( strcmp( crypt( arg1, ch->pcdata->pwd ), ch->pcdata->pwd ) ) ) { WAIT_STATE( ch, 40 ); send_to_char( "Wrong password. Wait 10 seconds.\n\r", ch ); return; } unlink(strsave); send_to_char("Character deleted.\n\r",ch); d = ch->desc; extract_char( ch, TRUE ); if ( d != NULL ) close_socket( d ); }
void do_spiderform( CHAR_DATA *ch, char *argument ) { char arg[MAX_INPUT_LENGTH]; char buf[MAX_STRING_LENGTH]; argument = one_argument(argument,arg); if (IS_NPC(ch)) return; if (!IS_CLASS(ch, CLASS_DROW) ||!IS_SET(ch->pcdata->powers[1], DPOWER_SPIDERFORM)) {send_to_char("Huh?\n\r", ch ); return;} if (IS_AFFECTED(ch, AFF_POLYMORPH)) { send_to_char("You can't spiderform while changed.\n\r", ch ); return; } if (IS_SET(ch->newbits,NEW_DFORM)) { sprintf(buf, "$n morphs back into %s.", GET_PROPER_NAME(ch)); act(buf, ch, NULL, NULL, TO_ROOM); stc("You return to your normal form.\n\r", ch); free_string(ch->morph); ch->morph = str_dup(""); ch->hitroll -= 400; ch->damroll -= 400; ch->armor += 1000; REMOVE_BIT(ch->newbits,NEW_DFORM); REMOVE_BIT(ch->newbits,THIRD_HAND); REMOVE_BIT(ch->newbits,FOURTH_HAND); WAIT_STATE(ch, 7); return; } else if (!IS_SET(ch->newbits,NEW_DFORM)) { act("You mutate into a giant spider.",ch,NULL,NULL,TO_CHAR); act("$n mutates into a giant spider.",ch,NULL,NULL,TO_ROOM); sprintf(buf,"%s the giant mylochar",ch->name); free_string(ch->morph); ch->morph = str_dup(buf); ch->hitroll += 400; ch->damroll += 400; ch->armor -= 1000; SET_BIT(ch->newbits,NEW_DFORM); SET_BIT(ch->newbits,THIRD_HAND); SET_BIT(ch->newbits,FOURTH_HAND); return; } return; }
void do_enmity(CHAR_DATA *ch, char *argument) { char arg1[MAX_INPUT_LENGTH]; char arg2[MAX_INPUT_LENGTH]; CHAR_DATA *victim1; CHAR_DATA *victim2; argument = one_argument( argument, arg1 ); argument = one_argument( argument, arg2 ); if (IS_NPC(ch)) return; if (!IS_CLASS(ch, CLASS_TANARRI)) { send_to_char("Huh?\n\r",ch); return; } if (!IS_SET(ch->pcdata->powers[TANARRI_POWER], TANARRI_EMNITY)) { send_to_char("you don't have that power yet.\n\r",ch); return; } if ((victim1 = get_char_room(ch, NULL, arg1)) == NULL) { send_to_char("They are not here.\n\r", ch); return; } if ((victim2 = get_char_room(ch, NULL, arg2)) == NULL) { send_to_char("They are not here.\n\r", ch); return; } if (IS_NPC(victim1) || IS_NPC(victim2)) { send_to_char("Not on NPC's\n\r",ch); return; } do_say(ch,"Xenus, Morkain, Hau!"); if (number_percent() > 60) { SET_BIT(victim1->pcdata->tempflag, TEMP_AGGRESSIVE); do_kill(victim1, victim2->pcdata->switchname); REMOVE_BIT(victim1->pcdata->tempflag, TEMP_AGGRESSIVE); } else send_to_char("#RSomeone is trying to control your actions!!!#n\n\r",victim1); if (number_percent() > 60) { SET_BIT(victim2->pcdata->tempflag, TEMP_AGGRESSIVE); do_kill(victim2, victim1->pcdata->switchname); REMOVE_BIT(victim2->pcdata->tempflag, TEMP_AGGRESSIVE); } else send_to_char("#RSomeone is trying to control your actions!!!#n\n\r",victim2); WAIT_STATE(ch,24); return; }
void do_chaossurge(CHAR_DATA *ch, char *argument) { CHAR_DATA *victim; char buf[MAX_STRING_LENGTH]; char arg[MAX_INPUT_LENGTH]; int dam; argument = one_argument( argument, arg ); if (IS_NPC(ch)) return; if (!IS_CLASS(ch, CLASS_TANARRI) && !IS_CLASS(ch, CLASS_LICH)) { send_to_char("Huh?\n\r",ch); return; } if (IS_CLASS(ch, CLASS_LICH) && ch->pcdata->powers[CHAOS_MAGIC] < 3) { send_to_char("Yes Master.\n\r",ch); return; } if ((victim = get_char_room(ch, arg)) == NULL) { send_to_char("They are not here.\n\r", ch); return; } if (IS_NPC(victim)) { send_to_char("Not on mobiles.\n\r",ch); return; } if (is_safe(ch,victim)) return; if (victim == ch) { send_to_char("That doesn't seem like a good idea.\n\r",ch); return; } if (victim->alignment < -500) { send_to_char("They are too evil, you cannot affect them.\n\r",ch); return; } if (victim->alignment > 500) dam = 1500; else if (victim->alignment > 0) dam = 1000; else dam = 500; sprintf(buf,"Your let chaos envelope $N and $S is hurt [%d]",dam); act(buf,ch,NULL,victim,TO_CHAR); sprintf(buf,"$n points a wicked finger at you and chaos strikes your mind! [%d]",dam); act(buf,ch,NULL,victim,TO_VICT); sprintf(buf,"$n strikes $N down with a burst of pure #RCHAOS!#n."); act(buf,ch,NULL,victim,TO_NOTVICT); hurt_person(ch,victim,dam); WAIT_STATE(ch,12); return; }
void do_track( CHAR_DATA* ch, const char* argument) { CHAR_DATA *vict; char arg[MAX_INPUT_LENGTH]; int dir, maxdist; if( !IS_NPC( ch ) && ch->pcdata->learned[gsn_track] <= 0 ) { send_to_char( "You do not know of this skill yet.\r\n", ch ); return; } one_argument( argument, arg ); if( arg[0] == '\0' ) { send_to_char( "Whom are you trying to track?\r\n", ch ); return; } WAIT_STATE( ch, skill_table[gsn_track]->beats ); if( !( vict = get_char_world( ch, arg ) ) ) { send_to_char( "You can't find a trail of anyone like that.\r\n", ch ); return; } maxdist = 100 + ch->level * 30; if( !IS_NPC( ch ) ) maxdist = ( maxdist * LEARNED( ch, gsn_track ) ) / 100; dir = find_first_step( ch->in_room, vict->in_room, maxdist ); switch ( dir ) { case BFS_ERROR: send_to_char( "Hmm... something seems to be wrong.\r\n", ch ); break; case BFS_ALREADY_THERE: send_to_char( "You're already in the same room!\r\n", ch ); break; case BFS_NO_PATH: send_to_char( "You can't sense a trail from here.\r\n", ch ); learn_from_failure( ch, gsn_track ); break; default: ch_printf( ch, "You sense a trail %s from here...\r\n", dir_name[dir] ); learn_from_success( ch, gsn_track ); break; } }
void do_forgivness( CHAR_DATA *ch, char *argument ) { CHAR_DATA *victim; char arg[MAX_INPUT_LENGTH]; argument = one_argument( argument, arg ); if (IS_NPC(ch)) return; if (!IS_CLASS(ch, CLASS_ANGEL)) { send_to_char("Huh?\n\r",ch); return; } if (ch->pcdata->powers[ANGEL_LOVE] < 3) { send_to_char("Your are not loving enough.\n\r",ch); return; } if ((victim = get_char_room(ch, arg)) == NULL) { send_to_char("They are not here.\n\r", ch); return; } if (IS_NPC(victim)) { send_to_char("Not on mobiles.\n\r",ch); return; } if (is_safe(ch,victim)) return; if (victim == ch) { send_to_char("You haven't sinned, why seek forgivness ??\n\r",ch); return; } if (IS_CLASS(ch, CLASS_TANARRI)) { send_to_char("You cannot forgive a creature of utter evil.\n\r",ch); return; } if (victim->alignment < 0) { send_to_char("They are not ready to seek forgivness, first they must repent.\n\r",ch); return; } victim->hit += number_range(1000,1500); if (victim->hit > victim->max_hit) victim->hit = victim->max_hit; act("You feel the cleansing love of God run through your veins, filling you with an inner peace.", victim, NULL, NULL, TO_CHAR); act("$n is struck by a ray of pure light, and a blissful smile crosses $s lips.", victim, NULL, NULL, TO_ROOM); send_to_char("You forgive them, and thus God forgives them for their sins.\n\r",ch); WAIT_STATE(ch, 16); return; }
void do_touchofgod(CHAR_DATA *ch, char *argument ) { CHAR_DATA *victim; char arg[MAX_INPUT_LENGTH]; int dam; argument = one_argument( argument, arg ); dam = number_range(100,200); if (IS_NPC(ch)) return; if (!IS_CLASS(ch, CLASS_ANGEL)) { send_to_char("Huh?\n\r",ch); return; } if (ch->pcdata->powers[ANGEL_JUSTICE] < 4) { send_to_char("You cannot channel the will of God yet.\n\r",ch); return; } if ((victim = get_char_room(ch, arg)) == NULL) { send_to_char("They are not here.\n\r", ch); return; } if (IS_NPC(victim)) { send_to_char("Not on mobiles.\n\r",ch); return; } if (is_safe(ch,victim)) return; if (victim == ch) { send_to_char("That doesn't seem like a good idea.\n\r",ch); return; } WAIT_STATE(ch, 18); hurt_person(ch, victim, dam); act("You grab $N by the forehead and channel God's justice into $S body.",ch,NULL,victim,TO_CHAR); act("$n grabs you by your forehead and sends a prayer to God, DAMN THAT HURT.",ch,NULL,victim,TO_VICT); act("$n grabs $N by the forehead and sends a prayer to God.",ch,NULL,victim,TO_NOTVICT); if (number_range(1,3) == 1) { if (victim->position == POS_FIGHTING) stop_fighting(victim,TRUE); act("$N screams in pain and drops to the ground as God's justice wrecks $S body.",ch,NULL,victim,TO_CHAR); act("AARGH!!! The pain is to much, you drop to the ground.",ch,NULL,victim,TO_VICT); act("$N screams in agony and falls to the ground.",ch,NULL,victim,TO_NOTVICT); victim->position = POS_STUNNED; } return; }