<commit_before>////////////////////////////////////////////////////////////////////
// 
//  disc_shaman_control
//
///////////////////////////////////////////////////////////////////

#include "stdsneezy.h"
#include "disease.h"
#include "combat.h"
#include "disc_shaman.h"
#include "spelltask.h"

int resurrection(TBeing * caster, TObj * obj, int level, byte bKnown)
{
  affectedData aff;
  TThing *t, *n;
  TMonster * victim;
  TBaseCorpse *corpse;

  if (!(corpse = dynamic_cast<TBaseCorpse *>(obj))) {
    caster->sendTo("You can't resurrect something that's not a corpse!\n\r");
    act("Nothing seems to happen.", FALSE, caster, 0, 0, TO_ROOM);
    return SPELL_FAIL;
  }

  if (caster->getMoney() < 25000) {
    caster->sendTo("You don't have enough talens to make the resurrection sacrifice.\n\r");
    act("Nothing seems to happen.", FALSE, caster, 0, 0, TO_ROOM);
    return SPELL_FAIL;
  }
  caster->addToMoney(-25000, GOLD_HOSPITAL);

  if (bSuccess(caster, bKnown, caster->getPerc(), SPELL_RESURRECTION)) {
    victim = read_mobile(corpse->getCorpseVnum(), VIRTUAL);
    *caster->roomp += *victim;
    victim->genericCharmFix();
    victim->setHit(1);
    victim->setPosition(POSITION_STUNNED);
    act("$N slowly rises from the $g.", FALSE, caster, 0, victim, TO_ROOM);
    caster->reconcileHelp(victim,discArray[SPELL_RESURRECTION]->alignMod);
      
    if (victim->isImmune(IMMUNE_CHARM, level)) {
      victim->setPosition(POSITION_STANDING);
      victim->doSay("Thank you");
      delete corpse;
      return SPELL_FALSE;
    } else if (caster->tooManyFollowers(victim, FOL_ZOMBIE)) {
      act("$N refuses to enter a group the size of yours!", TRUE, caster, NULL, victim, TO_CHAR);
      act("$N refuses to enter a group the size of $n's!", TRUE, caster, NULL, victim, TO_ROOM);
      delete corpse;
      return SPELL_FALSE;
    }

    aff.type      = SPELL_RESURRECTION;<commit_msg>resurrection update<commit_after>////////////////////////////////////////////////////////////////////
// 
//  disc_shaman_control
//
///////////////////////////////////////////////////////////////////

#include "stdsneezy.h"
#include "disease.h"
#include "combat.h"
#include "disc_shaman.h"
#include "spelltask.h"

int resurrection(TBeing * caster, TObj * obj, int level, byte bKnown)
{
  affectedData aff;
  TThing *t, *n;
  TMonster * victim;
  TBaseCorpse *corpse;

  if (!(corpse = dynamic_cast<TBaseCorpse *>(obj))) {
    caster->sendTo("You can't resurrect something that's not a corpse!\n\r");
    act("Nothing seems to happen.", FALSE, caster, 0, 0, TO_ROOM);
    return SPELL_FAIL;
  }

  if (caster->getMoney() < 2500) {
    caster->sendTo("You need 2500 talens to make the resurrection sacrifice.\n\r");
    act("Nothing seems to happen.", FALSE, caster, 0, 0, TO_ROOM);
    return SPELL_FAIL;
  }
  caster->addToMoney(-2500, GOLD_HOSPITAL);

  if (bSuccess(caster, bKnown, caster->getPerc(), SPELL_RESURRECTION)) {
    victim = read_mobile(corpse->getCorpseVnum(), VIRTUAL);
    *caster->roomp += *victim;
    victim->genericCharmFix();
    victim->setHit(1);
    victim->setPosition(POSITION_STUNNED);
    act("$N slowly rises from the $g.", FALSE, caster, 0, victim, TO_ROOM);
    caster->reconcileHelp(victim,discArray[SPELL_RESURRECTION]->alignMod);
      
    if (victim->isImmune(IMMUNE_CHARM, level)) {
      victim->setPosition(POSITION_STANDING);
      delete corpse;
      victim->doSay("Thank you soooooooo very much!");
      victim->doSay("How could I ever repay you for your deed?!");
      return SPELL_FALSE;
    } else if (caster->tooManyFollowers(victim, FOL_ZOMBIE)) {
      act("$N refuses to enter a group the size of yours!", TRUE, caster, NULL, victim, TO_CHAR);
      act("$N refuses to enter a group the size of $n's!", TRUE, caster, NULL, victim, TO_ROOM);
      delete corpse;
      return SPELL_FALSE;
    }

    aff.type      = SPELL_RESURRECTION;
{'fraction_non_alphanumeric': 0.20066803699897226, 'fraction_numerical': 0.008735868448098663, 'mean_word_length': 2.794346978557505, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 38, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 1, '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': '2331507', 'n_tokens_mistral': 1392, 'n_tokens_neox': 1291, 'n_words': 319}