<commit_before>//////////////////////////////////////////////////////////////////////////
//
// SneezyMUD - All rights reserved, SneezyMUD Coding Team
//
// $Log: magic_skills.cc,v $
// Revision 5.1  1999/10/16 04:31:17  batopr
// new branch
//
// Revision 1.1  1999/09/12 17:24:04  sneezy
// Initial revision
//
//
//////////////////////////////////////////////////////////////////////////


///////////////////////////////////////////////////////////////////////////
//
//   File containing all skills for spell casters, and classes with
//    casting derivatives. - <NAME>  Last Updated 03/15/94
//
///////////////////////////////////////////////////////////////////////////

#include "stdsneezy.h"
#include "combat.h"

int TBeing::doTurn(const char *argument, TBeing *vict)
{
  TBeing *victim;
  char caName[256];
  int percent;

  if (GetMaxLevel() <= MAX_MORT) {
    // turn bracket
    doNotHere();
    return FALSE;
  }

  // turn undead
  if (checkPeaceful("You feel too peaceful to contemplate violence.\n\r"))
    return FALSE;

  only_argument(argument, caName);

  if (!(victim = vict)) {
    if (!(victim = get_char_room_vis(this, caName))) {
      if (!(victim = fight())) {
        sendTo("Attempt to turn which minion of the darkness?\n\r");
        return FALSE;
      }
    }
  }
  if (!sameRoom(victim)) {
    sendTo("That person isn't around.\n\r");
    return FALSE;
  }
  if (victim == this) {
    sendTo("Now that would be quite pointless...\n\r");
    return FALSE;
  }
  if (attackers > 2) {
    sendTo("You're too busy fighting to perform such a ritual!\n\r");
    return FALSE;
  }
  if (victim->attackers >= 3) {
    sendTo("There are too many people in the way!\n\r");
    return FALSE;
  }
  if (!(victim->isUndead() || victim->isDiabolic())) {
    sendTo("They are not a minion of the darkness!\n\r");
    return FALSE;
  }
 /* Russ, check here if cleric has a symbol, and have them grope
    around if they can't find it etc.  Basically, copy it outta
    the cleric spells. */
  percent = ::number(1, 101);
#if 0
  percent = percent - (getWis() * 2) + (victim->getWis() * 2) -
      (getLevel(SHAMAN_LEVEL_IND)) + (victim->GetMaxLevel());
#endif

  if (victim->isDiabolic())
    percent += 50;
  if ((percent > getSkillValue(SKILL_TURN) || (victim->GetMaxLevel() > 50)) &&
      (GetMaxLevel() <= 50)) {
    if (victim->getPosition() > POSITION_DEAD) {
      act("$n boldly presents $s symbol to $N, only to have $s faith falter!", FALSE, this, 0, victim, TO_NOTVICT);
      act("You boldly present your symbol to $N, only to falter in your faith!", FALSE, this, 0, victim, TO_CHAR);
      act("Stronger in your faith than $n, you resist their attempts to turn you!", FALSE, this, 0, victim, TO_VICT);
      reconcileDamage(victim, 0, SKILL_TURN);
    }
  } else {
    act("$n boldly presents $s symbol to $N, confident in their faith.", FALSE, this, 0, victim, TO_NOTVICT);
    act("$n boldly presents $s symbol to you, confident in $s faith.", FALSE, this, 0, victim, TO_VICT);
    act("You boldly present your symbol to $N, confident in your faith.", FALSE, this, 0, victim, TO_CHAR);
#if 0
    if (isGood()) {
      act("$n's goodness sends $N reeling backwards in screams of agony!", FALSE, this, 0, victim, TO_NOTVICT);
      act("You scream in utter agony as $n's goodness penetrates your soul!", FALSE, this, 0, victim, TO_VICT);
      act("Your goodness sends $N reeling backwards in screams of agony!", FALSE, this, 0, victim, TO_CHAR);

      if ((percent < 5) || (GetMaxLevel() > 50)) {
	act("$N is blasted into oblivion!", FALSE, this, 0, victim, TO_NOTVICT);
	act("$N is blasted into oblivion!", FALSE, this, 0, victim, TO_VICT);
	act("$N is blasted into oblivion!", FALSE, this, 0, victim, TO_CHAR);
	victim->rawKill(SKILL_TURN);
        if (vict)
          return DELETE_VICT;
        delete victim;
        victim = NULL;
	return FALSE;
      } else {
	if (percent < 10) {
	  act("$N is blinded by $n's holiness!", FALSE, this, 0, victim, TO_NOTVICT);
	  act("$N is blinded by $n's holiness!", FALSE, this, 0, victim, TO_VICT);
	  act("$N is blinded by $n's holiness!", FALSE, this, 0, victim, TO_CHAR);

          victim->rawBlind(GetMaxLevel(), GetMaxLevel() * UPDATES_PER_TICK, SAVE_YES);

	  if (reconcileDamage(victim, (4 * getLevel(SHAMAN_LEVEL_IND)),DMG_DISINT) == -1) {
            if (vict)
              return DELETE_VICT;
            delete victim;
            victim = NULL
	    return FALSE;
          }
          if (!victim->isLucky(spellLuckModifier(SKILL_TURN)))
	    victim->addFeared(this);
	} else {
	  if (percent < 20) {
	    act("$N is stunned by $n's holiness!", FALSE, this, 0, victim, TO_NOTVICT);
	    act("$N is stunned by $n's holiness!", FALSE, this, 0, victim, TO_VICT);
	    act("$N is stunned by $n's holiness!", FALSE, this, 0, victim, TO_CHAR);
	    victim->setPosition(POSITION_STUNNED);
	    if (reconcileDamage(victim, (2 * getLevel(SHAMAN_LEVEL_IND)),SKILL_TURN) == -1) {
              if (vict)
                return DELETE_VICT;
              delete victim;
              victim = NULL
              return FALSE;
            }

            if (!victim->isLucky(spellLuckModifier(SKILL_TURN)))
              victim->addFeared(this);
	  } else {
	    if (reconcileDamage(victim, (getLevel(CLERIC_LEVEL_IND)),SKILL_TURN) == -1) {
              if (vict)
                return DELETE_VICT;
              delete victim;
              victim = NULL
              return FALSE;
            }
            if (!victim->isLucky(spellLuckModifier(SKILL_TURN)))
              victim->addFeared(this);
	  }
	}
      }
    } else {
      if (isEvil()) {
	act("$N becomes enthralled by $n's vileness!", FALSE, this, 0, victim, TO_NOTVICT);
	act("You are helpless but to submit to $n's darkness!", FALSE, this, 0, victim, TO_VICT);
	act("$N becomes enthralled by your vileness!", FALSE, this, 0, victim, TO_CHAR);
      }
    }
#endif
  }<commit_msg>turn skill update for shaman...may as well use it<commit_after>//////////////////////////////////////////////////////////////////////////
//
// SneezyMUD - All rights reserved, SneezyMUD Coding Team
//
//   File containing all skills for spell casters, and classes with
//    casting derivatives. - <NAME>
//
///////////////////////////////////////////////////////////////////////////

#include "stdsneezy.h"
#include "combat.h"

int TBeing::doTurn(const char *argument, TBeing *vict)
{
  TBeing *victim;
  char caName[256];
  int percent;

  if (GetMaxLevel() <= MAX_MORT) {
    // turn bracket
    doNotHere();
    return FALSE;
  }

  // turn undead
  if (checkPeaceful("You feel too peaceful to contemplate violence.\n\r"))
    return FALSE;

  only_argument(argument, caName);

  if (!(victim = vict)) {
    if (!(victim = get_char_room_vis(this, caName))) {
      if (!(victim = fight())) {
        sendTo("Attempt to turn which minion of the darkness?\n\r");
        return FALSE;
      }
    }
  }
  if (!sameRoom(*victim)) {
    sendTo("That person isn't around.\n\r");
    return FALSE;
  }
  if (victim == this) {
    sendTo("Now that would be quite pointless...\n\r");
    return FALSE;
  }
  if (attackers > 2) {
    sendTo("You're too busy fighting to perform such a ritual!\n\r");
    return FALSE;
  }
  if (victim->attackers >= 3) {
    sendTo("There are too many people in the way!\n\r");
    return FALSE;
  }
  if (!(victim->isUndead() || victim->isDiabolic())) {
    sendTo("They are not a minion of the darkness!\n\r");
    return FALSE;
  }
 /* Russ, check here if cleric has a symbol, and have them grope
    around if they can't find it etc.  Basically, copy it outta
    the cleric spells. */
  percent = ::number(1, 101);
#if 0
  percent = percent - (getWis() * 2) + (victim->getWis() * 2) -
      (getLevel(SHAMAN_LEVEL_IND)) + (victim->GetMaxLevel());
#endif

  if (victim->isDiabolic())
    percent += 50;
  if ((percent > getSkillValue(SKILL_TURN) || (victim->GetMaxLevel() > 50)) &&
      (GetMaxLevel() <= 50)) {
    if (victim->getPosition() > POSITION_DEAD) {
      act("$n attempts to confuse $N, but fails.", FALSE, this, 0, victim, TO_NOTVICT);
      act("You attempt to confuse $N, but fail.", FALSE, this, 0, victim, TO_CHAR);
      act("$n has just tried to confuse you!", FALSE, this, 0, victim, TO_VICT);
      reconcileDamage(victim, 0, SKILL_TURN);
    }
  } else {
    act("$n tries to confuse $N.", FALSE, this, 0, victim, TO_NOTVICT);
    act("$n tries to confuse you.", FALSE, this, 0, victim, TO_VICT);
    act("You try to confuse $N.", FALSE, this, 0, victim, TO_CHAR);
#if 0
    if (isGood()) {
      act("$n mind focus sends $N reeling backwards in screams of agony!", FALSE, this, 0, victim, TO_NOTVICT);
      act("You scream in utter agony as $n's mind penetrates your soul!", FALSE, this, 0, victim, TO_VICT);
      act("The loa send $N reeling backwards!", FALSE, this, 0, victim, TO_CHAR);

      if ((percent < 5) || (GetMaxLevel() > 50)) {
	act("$N is blasted into oblivion!", FALSE, this, 0, victim, TO_NOTVICT);
	act("$N is blasted into oblivion!", FALSE, this, 0, victim, TO_VICT);
	act("$N is blasted into oblivion!", FALSE, this, 0, victim, TO_CHAR);
	victim->rawKill(SKILL_TURN, this);
        if (vict)
          return DELETE_VICT;
        delete victim;
        victim = NULL;
	return FALSE;
      } else {
	if (percent < 10) {
	  act("$N is blinded!", FALSE, this, 0, victim, TO_NOTVICT);
	  act("$N is blinded!", FALSE, this, 0, victim, TO_VICT);
	  act("$N is blinded!", FALSE, this, 0, victim, TO_CHAR);

          victim->rawBlind(GetMaxLevel(), GetMaxLevel() * UPDATES_PER_MUDHOUR, SAVE_YES);

	  if (reconcileDamage(victim, (4 * getLevel(SHAMAN_LEVEL_IND)),DMG_DISINT) == -1) {
            if (vict)
              return DELETE_VICT;
            delete victim;
            victim = NULL
	    return FALSE;
          }
          if (!victim->isLucky(spellLuckModifier(SKILL_TURN)))
	    victim->addFeared(this);
	} else {
	  if (percent < 20) {
	    act("$N is stunned!", FALSE, this, 0, victim, TO_NOTVICT);
	    act("$N is stunned!", FALSE, this, 0, victim, TO_VICT);
	    act("$N is stunned!", FALSE, this, 0, victim, TO_CHAR);
	    victim->setPosition(POSITION_STUNNED);
	    if (reconcileDamage(victim, (2 * getLevel(SHAMAN_LEVEL_IND)),SKILL_TURN) == -1) {
              if (vict)
                return DELETE_VICT;
              delete victim;
              victim = NULL
              return FALSE;
            }

            if (!victim->isLucky(spellLuckModifier(SKILL_TURN)))
              victim->addFeared(this);
	  } else {
	    if (reconcileDamage(victim, (getLevel(CLERIC_LEVEL_IND)),SKILL_TURN) == -1) {
              if (vict)
                return DELETE_VICT;
              delete victim;
              victim = NULL
              return FALSE;
            }
            if (!victim->isLucky(spellLuckModifier(SKILL_TURN)))
              victim->addFeared(this);
	  }
	}
      }
    } else {
      if (isEvil()) {
	act("$N becomes enthralled by $n!", FALSE, this, 0, victim, TO_NOTVICT);
	act("You are helpless but to submit to $n!", FALSE, this, 0, victim, TO_VICT);
	act("$N becomes enthralled by you!", FALSE, this, 0, victim, TO_CHAR);
      }
    }
#endif
  }
{'fraction_non_alphanumeric': 0.17844696631221518, 'fraction_numerical': 0.012867482798677509, 'mean_word_length': 2.3619705617302493, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 51, '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': '5354473', 'n_tokens_mistral': 3975, 'n_tokens_neox': 3680, 'n_words': 1102}