engine/description/source/SpellDescriber.cpp
// The description of the spell for the spellcasting UI screen.
The description of the spell for the spellcasting UI screen.
The description of the spell for the spellcasting UI screen .
string SpellDescriber::describe() const
{
  stringstream ss;
  SpellKnowledge& sk = creature->get_spell_knowledge_ref();
  Skills skills;
  string spell_name = StringTable::get(spell.get_spell_name_sid());
  string spell_category = StringTable::get(skills.get_skill(spell.get_magic_category())->get_skill_name_sid());
  IndividualSpellKnowledge isk = sk.get_spell_knowledge(spell.get_spell_id());
  ss << spell_name 
     << " (" << spell_category << ")" 
     << " [" 
             << "#:" << isk.get_castings()
             << ", " << StringTable::get(TextKeys::RANGE_ABRV) << ":" << describe_range()
             << ", " << StringTable::get(TextKeys::ARCANA_POINTS_ABRV) << ":" << spell.get_ap_cost()
             << ", +"<< isk.get_bonus().get_base()
     <<  "]";
  return ss.str();
}
string SpellDescriber :: describe ( ) const { stringstream ss ; SpellKnowledge & sk = creature -> get_spell_knowledge_ref ( ) ; Skills skills ; string spell_name = StringTable :: get ( spell . get_spell_name_sid ( ) ) ; string spell_category = StringTable :: get ( skills . get_skill ( spell . get_magic_category ( ) ) -> get_skill_name_sid ( ) ) ; IndividualSpellKnowledge isk = sk . get_spell_knowledge ( spell . get_spell_id ( ) ) ; ss << spell_name << " " << spell_category << " " << " " << " " << isk . get_castings ( ) << " " << StringTable :: get ( TextKeys :: RANGE_ABRV ) << " " << describe_range ( ) << " " << StringTable :: get ( TextKeys :: ARCANA_POINTS_ABRV ) << " " << spell . get_ap_cost ( ) << " " << isk . get_bonus ( ) . get_base ( ) << " " ; return ss . str ( ) ; }
The description of the spell for the spellcasting UI screen.
The description of the spell for the spellcasting UI screen .