<commit_before>//////////////////////////////////////////////////////////////////////////
//
// SneezyMUD - All rights reserved, SneezyMUD Coding Team
//
//////////////////////////////////////////////////////////////////////////


#include "stdsneezy.h"
#include "disease.h"
#include "combat.h"
#include "disc_looting.h"
#include "obj_trap.h"
#include "obj_portal.h"

int TBeing::doSearch(const char *argument)
{
  int rc;

  if (!doesKnowSkill(SKILL_SEARCH)) {
    sendTo("You are not trained in how to recognize secret passages!\n\r");
    return FALSE;
  }

  if (riding) {
    sendTo("You cannot search while riding.\n\r");
    return FALSE;
  }
  for (; isspace(*argument); argument++);

  if (!*argument) {
    sendTo("You begin searching for secret exits.\n\r");
    act("$n begins searching the walls for something.",
        FALSE, this, 0, 0, TO_ROOM);
    start_task(this, NULL, NULL, TASK_SEARCH, "", 0, in_room, 1, 0, 4);
  } else {
    for(rc = 0; rc < MAX_DIR; rc++)
      if (is_abbrev(argument, dirs[rc])) {
        start_task(this, NULL, NULL, TASK_SEARCH, "", 0, in_room, 1, rc+100, 4);
        return TRUE;
      }
    sendTo("You look and look, but cannot seem to find that direction.\n\r");
  }
  return TRUE;
}

int detectSecret(TBeing * thief)
{
  int j;
  roomDirData *fdd;
  char buf[128];
  int move_cost;

  move_cost = 30;

  *buf = '\0';

  if (thief->getMove() < move_cost) {
    thief->sendTo("You are too tired to search.  Maybe later...\n\r");
    return FALSE;
  }
  if (thief->riding) {
    thief->sendTo("You can't search while mounted.\n\r");
    return FALSE;
  }
  int bKnown = thief->getSkillValue(SKILL_SEARCH);
<commit_msg>allowed diag abbrevs for search<commit_after>//////////////////////////////////////////////////////////////////////////
//
// SneezyMUD - All rights reserved, SneezyMUD Coding Team
//
//////////////////////////////////////////////////////////////////////////


#include "stdsneezy.h"
#include "disease.h"
#include "combat.h"
#include "disc_looting.h"
#include "obj_trap.h"
#include "obj_portal.h"

int TBeing::doSearch(const char *argument)
{
  int rc;

  if (!doesKnowSkill(SKILL_SEARCH)) {
    sendTo("You are not trained in how to recognize secret passages!\n\r");
    return FALSE;
  }

  if (riding) {
    sendTo("You cannot search while riding.\n\r");
    return FALSE;
  }
  for (; isspace(*argument); argument++);

  if (!*argument) {
    sendTo("You begin searching for secret exits.\n\r");
    act("$n begins searching the walls for something.",
        FALSE, this, 0, 0, TO_ROOM);
    start_task(this, NULL, NULL, TASK_SEARCH, "", 0, in_room, 1, 0, 4);
  } else {
    for(rc = 0; rc < MAX_DIR; rc++){
      if (is_abbrev(argument, dirs[rc])) {
        start_task(this, NULL, NULL, TASK_SEARCH, "", 0, in_room, 1, rc+100, 4);
        return TRUE;
      }
    }
    // there's probably a better way to do this
    if(!strcmp(argument, "ne")){
      start_task(this, NULL, NULL, TASK_SEARCH, "", 0, in_room, 1, DIR_NORTHEAST+100, 4);
      return TRUE;
    } else if(!strcmp(argument, "nw")){
      start_task(this, NULL, NULL, TASK_SEARCH, "", 0, in_room, 1, DIR_NORTHWEST+100, 4);
      return TRUE;
    } else if(!strcmp(argument, "se")){
      start_task(this, NULL, NULL, TASK_SEARCH, "", 0, in_room, 1, DIR_SOUTHEAST+100, 4);
      return TRUE;
    } else if(!strcmp(argument, "sw")){
      start_task(this, NULL, NULL, TASK_SEARCH, "", 0, in_room, 1, DIR_SOUTHWEST+100, 4);
      return TRUE;
    }


    sendTo("You look and look, but cannot seem to find that direction.\n\r");
  }
  return TRUE;
}

int detectSecret(TBeing * thief)
{
  int j;
  roomDirData *fdd;
  char buf[128];
  int move_cost;

  move_cost = 30;

  *buf = '\0';

  if (thief->getMove() < move_cost) {
    thief->sendTo("You are too tired to search.  Maybe later...\n\r");
    return FALSE;
  }
  if (thief->riding) {
    thief->sendTo("You can't search while mounted.\n\r");
    return FALSE;
  }
  int bKnown = thief->getSkillValue(SKILL_SEARCH);

{'fraction_non_alphanumeric': 0.21764117941029484, 'fraction_numerical': 0.015492253873063468, 'mean_word_length': 2.3695286195286194, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4078440', 'n_tokens_mistral': 1482, 'n_tokens_neox': 1381, 'n_words': 379}