eldhamud/boards/
eldhamud/clans/
eldhamud/classes/
eldhamud/councils/
eldhamud/deity/
eldhamud/doc/
eldhamud/doc/DIKU/
eldhamud/doc/MERC/
eldhamud/doc/mudprogs/
eldhamud/gods/
eldhamud/houses/
eldhamud/lockers/
eldhamud/player/a/
/****************************************************************************
 *   _______  _        ______            _______  _______           ______   *
 *  (  ____ \( \      (  __  \ |\     /|(  ___  )(       )|\     /|(  __  \  *
 *  | (    \/| (      | (  \  )| )   ( || (   ) || () () || )   ( || (  \  ) *
 *  | (__    | |      | |   ) || (___) || (___) || || || || |   | || |   ) | *
 *  |  __)   | |      | |   | ||  ___  ||  ___  || |(_)| || |   | || |   | | *
 *  | (      | |      | |   ) || (   ) || (   ) || |   | || |   | || |   ) | *
 *  | (____/\| (____/\| (__/  )| )   ( || )   ( || )   ( || (___) || (__/  ) *
 *  (_______/(_______/(______/ |/     \||/     \||/     \|(_______)(______/  *
 *              +-+-+-+  +-+-+-+-+-+-+-+  +-+-+-+-+-+-+-+-+-+-+              *
 *              |T|h|e|  |O|a|k|l|a|n|d|  |C|h|r|o|n|i|c|l|e|s|              *
 *              +-+-+-+  +-+-+-+-+-+-+-+  +-+-+-+-+-+-+-+-+-+-+              *
 * ------------------------------------------------------------------------- *
 * EldhaMUD code (C) 2003-2005 by Robert Powell (Tommi)                      *
 * EldhaMUD Team: Celest, Altere and Krelowyn                                *
 * ------------------------------------------------------------------------- *
 *                                                                           *
 ****************************************************************************/

#include "./Headers/mud.h"


void update_all_qobjs( CHAR_DATA * ch );

void do_remort( CHAR_DATA * ch, char *argument )
{
  char buf[MAX_INPUT_LENGTH];
  int vhit, vmana, vmove, wear_loc, value, sn;
  OBJ_DATA *obj, *obj_next;


  if( IS_NPC( ch ) )
    {
      send_to_char( "I'm sorry, mobs cannot remort!\n\r", ch );
      return;
    }

  if( ch->level == LEVEL_IMMORTAL )
    {
      send_to_char( "Heros cannot be remorted, sorry!\n\r", ch );
      return;
    }

  if( ch->level > LEVEL_HERO )
    {
      send_to_char( "Immortals cannot be remorted, sorry!\n\r", ch );
      return;
    }

  if( ch->remorts >= 20 )
    {
      send_to_char( "This char has already been remorted too many times.\n\r", ch );
      return;
    }

  ch->remorts = 1;

  if (ch->remorts == 1)
    {

      if( argument[0] == '\0' )
        {
 
send_to_char("&c@-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&c@\n\r", ch);
send_to_char("&c|&Y            ,---.               o     |    o                            &c|\n\r", ch);
send_to_char("&c+&Y            `---.,---.,---.,---..,---.|    .,---,,---.                  &c+\n\r", ch);
send_to_char("&c|&Y                ||   ||---'|    |,---||    | .-' |---'                  &c|\n\r", ch);
send_to_char("&c+&Y            `---'|---'`---'`---'``---^`---'`'---'`---'                  &c+\n\r", ch);
send_to_char("&c|&Y                 |                                                      &c|\n\r", ch);
send_to_char("&c@-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&c@\n\r", ch);
send_to_char("&c+                                                                        &c+\n\r", ch);
send_to_char("&c|&w  The Oakland Chronicles has no classes as such. But rather it employs  &c|\n\r", ch);
send_to_char("&c+&w  a classless structure of player developement that allows you, the     &c+\n\r", ch);
send_to_char("&c|&w  player to make decisions about your character to develope their skill &c|\n\r", ch);
send_to_char("&c+&w  set how you best see fit. At this point you can choose to follow one  &c+\n\r", ch);
send_to_char("&c|&w  of 3 defined paths. (Note that this decision will NOT hinder your     &c|\n\r", ch);
send_to_char("&c+&w  characters future, but only sets the starting path. There will be     &c+\n\r", ch);
send_to_char("&c|&w  other oportunities within the game to gain other skill you may need)  &c|\n\r", ch);
send_to_char("&c+                                                                        &c+\n\r", ch);
send_to_char("&c|&w  Magical Citizen: Has more magical ability, casts and spells. Less     &c|\n\r", ch);
send_to_char("&c+&w  attacking skills and physical attacks.                                &c+\n\r", ch);
send_to_char("&c|                                                                        &c|\n\r", ch);
send_to_char("&c+&w  Fighter Citizen: Has more attacking skills and attacks. Less magical  &c+\n\r", ch);
send_to_char("&c|&w  ability, casts and spells.                                            &c|\n\r", ch);
send_to_char("&c+                                                                        &c+\n\r", ch);
send_to_char("&c|&w  Generic Citizen: Has an even balance of magical and physical fighting &c|\n\r", ch);
send_to_char("&c+&w  abilities.                                                            &c+\n\r", ch);
send_to_char("&c|                                                                        &c|\n\r", ch);
send_to_char("&c@-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+&c@\n\r", ch);
send_to_char("&WEnter the Specialization for %s: (M/F/G)?\n\r", ch);
          return;
        }

      switch ( * argument )
        {
        case 'm':
        case 'M':
          send_to_char("M selected.\n\r", ch);
          break;

        case 'f':
        case 'F':
          send_to_char("F selected.\n\r", ch);
          break;

        case 'g':
        case 'G':
          send_to_char("G selected.\n\r", ch);
          break;

        default:
          send_to_char("Incorrect argument, remort failed.\n\r", ch);
          break;

        }
    }

  return;
  send_to_char( "Having conquered that which has been set before you, you demand that\n\r"
                "the immortals buff you up a little more, maybe with eq or a nifty set of\n\r"
                "commands. Well it seems your ego has gotten you into some trouble, as\n\r"
                "your mind becomes instantly filled with a loud thunder and images of death.\n\r"
                "Maybe today was the wrong time to annoy the immortals...\n\r", ch );

  for( wear_loc = WEAR_LIGHT; wear_loc <= MAX_WEAR; wear_loc++ )
    {
      if( ( obj = get_eq_char( ch, wear_loc ) ) == NULL )
        continue;
      unequip_char( ch, obj );
    }

  for( obj = ch->first_carrying; obj != NULL; obj = obj_next )
    {
      obj_next = obj->next_content;
      if( xIS_SET( obj->extra_flags, ITEM_QUEST ) )
        continue;
      else
        {
          obj_from_char( obj );
          extract_obj( obj );
        }
    }


  do_restore( ch, ch->name );
  vhit = ch->hit /= 3;
  vmana = ch->mana /= 3;
  vmove = ch->move /= 3;

  ch->max_hit = vhit;
  ch->max_mana = vmana;
  ch->max_move = vmove;
  ch->hit = vhit;
  ch->mana = vmana;
  ch->move = vmove;
  ch->level = 10;
  ch->exp = 0;
  ch->perm_str = 13;
  ch->perm_con = 13;
  ch->perm_cha = 13;
  ch->perm_lck = 13;
  ch->perm_wis = 13;
  ch->perm_int = 13;
  ch->perm_dex = 13;
  ch->armor = 100;
  ch->hitroll = 0;
  ch->damroll = 0;
  for( sn = 0; sn < top_sn; sn++ )
    {
      /*
       * Fix by Narn to prevent ssetting skills the player shouldn't have. 
       */
      if( skill_table[sn]->name && ( ch->level >= skill_table[sn]->skill_level[ch->class] || value == 0 ) )
        {

          ch->pcdata->learned[sn] = 0;
        }
    }

  send_to_char( "For all your hard work, the immortals wish to bless you with the following skills.\n\r", ch );

  if( ch->remorts > 4 )
    {
      send_to_char( "Eighth Cast\n\r", ch );
      ch->pcdata->learned[gsn_eighth_cast] = 1;
    }
  if( ch->remorts > 3 )
    {
      send_to_char( "Eighth Attack and Seventh Cast\n\r", ch );
      ch->pcdata->learned[gsn_seventh_cast] = 1;
      ch->pcdata->learned[gsn_eighth_attack] = 1;
    }
  if( ch->remorts > 2 )
    {
      send_to_char( "Sixth Cast\n\r", ch );
      ch->pcdata->learned[gsn_sixth_cast] = 1;
    }
  if( ch->remorts > 1 )
    {
      send_to_char( "Seventh Attack and Fifth Cast\n\r", ch );
      ch->pcdata->learned[gsn_fifth_cast] = 1;
      ch->pcdata->learned[gsn_seventh_attack] = 1;
    }
  if( ch->remorts > 0 )
    {
      send_to_char( "Combo, Enhanced Dammage and Fourth Cast\n\r", ch );
      ch->pcdata->learned[gsn_combo] = 1;
      ch->pcdata->learned[gsn_enhanced_damage] = 1;
      ch->pcdata->learned[gsn_fourth_cast] = 1;
    }
  sprintf( buf, "&R[&CANNOUNCEMENT&R]&c:{xAll congratulate {R%s{x, who has just remorted. {x\n\r", ch->name );
  talk_info( AT_PURPLE, buf );
  do_double( ch, "exp on 60" );
  update_all_qobjs( ch );

  return;
}