engine/calculators/source/SpellbookCalculator.cpp
// Check to see if the spellbook is destroyed after a successful reading.
Check to see if the spellbook is destroyed after a successful reading.
Check to see if the spellbook is destroyed after a successful reading .
bool SpellbookCalculator::get_is_spellbook_destroyed(const ItemStatus spellbook_status)
{
  bool spellbook_destroyed = false;
  int failure_check = RNG::dice(1, 100);
  int failure_level = status_failure_levels[spellbook_status];
  if (failure_check <= failure_level)
  {
    spellbook_destroyed = true;
  }
  return spellbook_destroyed;
}
bool SpellbookCalculator :: get_is_spellbook_destroyed ( const ItemStatus spellbook_status ) { bool spellbook_destroyed = false ; int failure_check = RNG :: dice ( 1 , 100 ) ; int failure_level = status_failure_levels [ spellbook_status ] ; if ( failure_check <= failure_level ) { spellbook_destroyed = true ; } return spellbook_destroyed ; }
Check to see if the spellbook is destroyed after a successful reading.
Check to see if the spellbook is destroyed after a successful reading .