/*************************************************************************** * Original Diku Mud copyright (C) 1990, 1991 by Sebastian Hammer, * * Michael Seifert, Hans Henrik St{rfeldt, Tom Madsen, and Katja Nyboe. * * * * Merc Diku Mud improvments copyright (C) 1992, 1993 by Michael * * Chastain, Michael Quan, and Mitchell Tse. * * * * In order to use any part of this Merc Diku Mud, you must comply with * * both the original Diku license in 'license.doc' as well the Merc * * license in 'license.txt'. In particular, you may not remove either of * * these copyright notices. * * * * Much time and thought has gone into this software and you are * * benefitting. We hope that you share your changes too. What goes * * around, comes around. * ***************************************************************************/ /********************************************* * WarWizard : Concept - Xrakisis * * Developed - Kurama * *********************************************/ #if defined(macintosh) #include <types.h> #else #include <sys/types.h> #endif #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> #include "merc.h" void do_conjure (CHAR_DATA *ch, char *argument) { char arg [MIL]; char arg2[MIL]; char buf [MSL]; argument = one_argument( argument, arg ); argument = one_argument( argument, arg2 ); if (IS_NPC(ch)) return; if( !IS_CLASS(ch, CLASS_WIZARD) ) { send_to_char("Huh.\n\r",ch); return; } if (arg[0] == '\0' && arg2[0] == '\0') { stc("|<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>|\n\r",ch); stc("| Magics |\n\r",ch); stc("| |\n\r",ch); sprintf(buf,"| Addative : [ %s%s%s%s%s%s%s ] |\n\r", ch->pcdata->powers[WIZ_ADD] > 0 ? "#G*#n" : " ", ch->pcdata->powers[WIZ_ADD] > 1 ? "#G*#n" : " ", ch->pcdata->powers[WIZ_ADD] > 2 ? "#G*#n" : " ", ch->pcdata->powers[WIZ_ADD] > 3 ? "#G*#n" : " ", ch->pcdata->powers[WIZ_ADD] > 4 ? "#G*#n" : " ", ch->pcdata->powers[WIZ_ADD] > 5 ? "#G*#n" : " ", ch->pcdata->powers[WIZ_ADD] > 6 ? "#G*#n" : " "); stc(buf,ch); stc("| |\n\r",ch); sprintf(buf,"| Subtractive : [ %s%s%s%s%s%s%s ] |\n\r", ch->pcdata->powers[WIZ_SUB] > 0 ? "#R*#n" : " ", ch->pcdata->powers[WIZ_SUB] > 1 ? "#R*#n" : " ", ch->pcdata->powers[WIZ_SUB] > 2 ? "#R*#n" : " ", ch->pcdata->powers[WIZ_SUB] > 3 ? "#R*#n" : " ", ch->pcdata->powers[WIZ_SUB] > 4 ? "#R*#n" : " ", ch->pcdata->powers[WIZ_SUB] > 5 ? "#R*#n" : " ", ch->pcdata->powers[WIZ_SUB] > 6 ? "#R*#n" : " "); stc(buf,ch); stc("| |\n\r",ch); stc("|<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>|\n\r",ch); return; } if (arg2[0] == '\0') { if (!str_cmp(arg,"addative")) { stc("Addative : The power of creation.\n\r\n\r",ch); if (ch->pcdata->powers[WIZ_ADD] < 1) stc("You have gained no powers.\n\r",ch); if (ch->pcdata->powers[WIZ_ADD] > 0) stc("1: TBA\n\r",ch); if (ch->pcdata->powers[WIZ_ADD] > 1) stc("2: TBA\n\r",ch); if (ch->pcdata->powers[WIZ_ADD] > 2) stc("3: TBA\n\r",ch); if (ch->pcdata->powers[WIZ_ADD] > 3) stc("4: TBA\n\r",ch); if (ch->pcdata->powers[WIZ_ADD] > 4) stc("5: TBA\n\r",ch); if (ch->pcdata->powers[WIZ_ADD] > 5) stc("6: TBA\n\r",ch); if (ch->pcdata->powers[WIZ_ADD] > 6) stc("7: TBA\n\r",ch); return; } else if (!str_cmp(arg,"subtractive")) { stc("Subtractive : The power of destruction.\n\r\n\r",ch); if (ch->pcdata->powers[WIZ_SUB] < 1) stc("You have gained no powers.\n\r",ch); if (ch->pcdata->powers[WIZ_SUB] > 0) stc("1: TBA\n\r",ch); if (ch->pcdata->powers[WIZ_SUB] > 1) stc("2: Slow: The power to make your opponents move slower thus hitting you less.\n\r",ch); if (ch->pcdata->powers[WIZ_SUB] > 2) stc("3: TBA\n\r",ch); if (ch->pcdata->powers[WIZ_SUB] > 3) stc("4: TBA\n\r",ch); if (ch->pcdata->powers[WIZ_SUB] > 4) stc("5: TBA\n\r",ch); if (ch->pcdata->powers[WIZ_SUB] > 5) stc("6: TBA\n\r",ch); if (ch->pcdata->powers[WIZ_SUB] > 6) stc("7: TBA\n\r",ch); return; } else { sprintf(buf,"Addative : [ %s%s%s%s%s%s%s ] Subtractive: [ %s%s%s%s%s%s%s ]\n\r", ch->pcdata->powers[WIZ_ADD] > 0 ? "#G*#n" : " ", ch->pcdata->powers[WIZ_ADD] > 1 ? "#G*#n" : " ", ch->pcdata->powers[WIZ_ADD] > 2 ? "#G*#n" : " ", ch->pcdata->powers[WIZ_ADD] > 3 ? "#G*#n" : " ", ch->pcdata->powers[WIZ_ADD] > 4 ? "#G*#n" : " ", ch->pcdata->powers[WIZ_ADD] > 5 ? "#G*#n" : " ", ch->pcdata->powers[WIZ_ADD] > 6 ? "#G*#n" : " ", ch->pcdata->powers[WIZ_SUB] > 0 ? "#R*#n" : " ", ch->pcdata->powers[WIZ_SUB] > 1 ? "#R*#n" : " ", ch->pcdata->powers[WIZ_SUB] > 2 ? "#R*#n" : " ", ch->pcdata->powers[WIZ_SUB] > 3 ? "#R*#n" : " ", ch->pcdata->powers[WIZ_SUB] > 4 ? "#R*#n" : " ", ch->pcdata->powers[WIZ_SUB] > 5 ? "#R*#n" : " ", ch->pcdata->powers[WIZ_SUB] > 6 ? "#R*#n" : " "); stc(buf,ch); return; } } if (!str_cmp(arg2,"power")) { int improve; int cost; int max; if (!str_cmp(arg,"addative" )) {improve = WIZ_ADD; max=7;} else if (!str_cmp(arg,"subtractive" )) {improve = WIZ_SUB; max=7;} else { send_to_char("Magics: Addative , Subtractive.\n\r",ch); return; } cost = (ch->pcdata->powers[improve]+1) * 30; arg[0] = UPPER(arg[0]); if ( ch->pcdata->powers[improve] >= max ) { sprintf(buf,"You have already gained all the powers of %s magic.\n\r", arg); send_to_char(buf,ch); return; } if ( cost > ch->practice ) { sprintf(buf,"It costs you %d primal to improve your %s magic.\n\r", cost, arg); send_to_char(buf,ch); return; } ch->pcdata->powers[improve] += 1; ch->practice -= cost; sprintf(buf,"You gain power in %s magic.\n\r", arg); send_to_char(buf,ch); } else stc("To gain power: Conjure <Addative/Subtractive> power.\n\r",ch); return; } void do_slow( CHAR_DATA *ch, char *argument ) { CHAR_DATA *victim; char arg [MIL]; char buf [MSL]; argument = one_argument( argument, arg ); if (IS_NPC(ch)) return; if ( !IS_CLASS(ch, CLASS_WIZARD) ) { send_to_char("Huh?\n\r",ch); return; } if (ch->pcdata->powers[WIZ_SUB] < 2) { stc("You have not gained the subtractive power 'Slow'.\n\r",ch); return; } if ( ( ( victim = ch->fighting ) == NULL ) && ( arg[0] == '\0' ) ) { send_to_char( "Cast Slow on whom?\n\r", ch ); return; } if ( arg[0] != '\0' ) { if ( ( victim = get_char_room( ch, arg ) ) == NULL ) { send_to_char( "They aren't here.\n\r", ch ); return; } } if ( is_safe(ch,victim) ) return; if ( ch->mana < 10000 ) { send_to_char( "You don't have enough magical energy.\n\r", ch ); return; } SET_TIMER(victim, TIMER_SLOW, 3); // SET_BIT(victim->extra, EXTRA_SLOW); sprintf(buf,"$n places his hand on your head and you suddenly feel extremely slow\n\r"); act(buf,ch,NULL,victim,TO_VICT); sprintf(buf,"You harness your subtractive power to slow down $N\n\r"); act(buf,ch,NULL,victim,TO_CHAR); }