Exemplo n.º 1
0
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));
}
Exemplo n.º 2
0
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());
}
Exemplo n.º 3
0
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;
}