bool HeroBase::CanTeachSpell(const Spell & spell) const { int learning = GetLevelSkill(Skill::Secondary::LEARNING); return ((4 == spell.Level() && Skill::Level::EXPERT == learning) || (3 == spell.Level() && Skill::Level::ADVANCED <= learning) || (3 > spell.Level() && Skill::Level::BASIC <= learning)); }
bool HeroBase::CanLearnSpell(const Spell & spell) const { int wisdom = GetLevelSkill(Skill::Secondary::WISDOM); return ((4 < spell.Level() && Skill::Level::EXPERT == wisdom) || (4 == spell.Level() && Skill::Level::ADVANCED <= wisdom) || (3 == spell.Level() && Skill::Level::BASIC <= wisdom) || 3 > spell.Level()); }
bool HeroBase::CanTranscribeScroll(const Artifact & art) const { Spell spell = art.GetSpell(); if(spell.isValid() && CanCastSpell(spell)) { int learning = GetLevelSkill(Skill::Secondary::LEARNING); return ((3 < spell.Level() && Skill::Level::EXPERT == learning) || (3 == spell.Level() && Skill::Level::ADVANCED <= learning) || (3 > spell.Level() && Skill::Level::BASIC <= learning)); } return false; }