engine/calculators/source/AlignmentCalculator.cpp
// Sacrificing on a cross-aligned altar is risky, because it changes the
// creature's alignment; this can cause the creature to cross an alignment
// barrier, causing them to forsake their deity, become a fallen champion
// (if applicable), etc.
Sacrificing on a cross-aligned altar is risky, because it changes the
creature's alignment; this can cause the creature to cross an alignment
barrier, causing them to forsake their deity, become a fallen champion
(if applicable), etc.
Sacrificing on a cross - aligned altar is risky because it changes the creature ' s alignment ; this can cause the creature to cross an alignment barrier causing them to forsake their deity become a fallen champion ( if applicable ) etc .
int AlignmentCalculator::calculate_alignment_for_sacrifice_on_crossaligned_altar(int current_alignment, const AlignmentRange current_alignment_range, const AlignmentRange altar_alignment_range)
{
  int new_alignment = current_alignment;
  float multiplier = BASE_ALIGNMENT_MULTIPLIER_CROSSALIGNED;
  if (current_alignment_range == altar_alignment_range)
  {
    return current_alignment;
  }
  if (AlignmentUtils::are_alignments_opposites(current_alignment_range, altar_alignment_range))
  {
    multiplier *= 1.5;
  }
  switch (current_alignment_range)
  {
    case AlignmentRange::ALIGNMENT_RANGE_GOOD:
      new_alignment -= static_cast<int>(BASE_ALIGNMENT_DELTA_CROSSALIGNED * multiplier);
      break;
    case AlignmentRange::ALIGNMENT_RANGE_EVIL:
      new_alignment += static_cast<int>(BASE_ALIGNMENT_DELTA_CROSSALIGNED * multiplier);
      break;
    case AlignmentRange::ALIGNMENT_RANGE_NEUTRAL:
      if (altar_alignment_range == AlignmentRange::ALIGNMENT_RANGE_GOOD)
      {
        new_alignment += static_cast<int>(BASE_ALIGNMENT_DELTA_CROSSALIGNED * multiplier);
      }
      else
      {
        new_alignment -= static_cast<int>(BASE_ALIGNMENT_DELTA_CROSSALIGNED * multiplier);
      }
      break;
    default:
      break;
  }
  return new_alignment;
}
int AlignmentCalculator :: calculate_alignment_for_sacrifice_on_crossaligned_altar ( int current_alignment , const AlignmentRange current_alignment_range , const AlignmentRange altar_alignment_range ) { int new_alignment = current_alignment ; float multiplier = BASE_ALIGNMENT_MULTIPLIER_CROSSALIGNED ; if ( current_alignment_range == altar_alignment_range ) { return current_alignment ; } if ( AlignmentUtils :: are_alignments_opposites ( current_alignment_range , altar_alignment_range ) ) { multiplier *= 1.5 ; } switch ( current_alignment_range ) { case AlignmentRange :: ALIGNMENT_RANGE_GOOD : new_alignment -= static_cast < int > ( BASE_ALIGNMENT_DELTA_CROSSALIGNED * multiplier ) ; break ; case AlignmentRange :: ALIGNMENT_RANGE_EVIL : new_alignment += static_cast < int > ( BASE_ALIGNMENT_DELTA_CROSSALIGNED * multiplier ) ; break ; case AlignmentRange :: ALIGNMENT_RANGE_NEUTRAL : if ( altar_alignment_range == AlignmentRange :: ALIGNMENT_RANGE_GOOD ) { new_alignment += static_cast < int > ( BASE_ALIGNMENT_DELTA_CROSSALIGNED * multiplier ) ; } else { new_alignment -= static_cast < int > ( BASE_ALIGNMENT_DELTA_CROSSALIGNED * multiplier ) ; } break ; default : break ; } return new_alignment ; }
Sacrificing on a cross-aligned altar is risky, because it changes the
creature's alignment; this can cause the creature to cross an alignment
barrier, causing them to forsake their deity, become a fallen champion
(if applicable), etc.
Sacrificing on a cross - aligned altar is risky because it changes the creature ' s alignment ; this can cause the creature to cross an alignment barrier causing them to forsake their deity become a fallen champion ( if applicable ) etc .
// Crossing two alignment barriers causes a greater drift.