I would like to allow player use specific spell from a scroll with no requirements needed to cast it with 100% chance (magery, int, regs, etc.). Any ideas?
 
basically look for [almost] all instances of BaseWand and add additional checks for SpellScroll

spell.cs
- public virtual bool CheckFizzle()
Code:
public virtual bool CheckFizzle()
        {
            if (m_Scroll is BaseWand)
            {
                return true;
            }
           
            if (m_Scroll is SpellScroll)
            {
                return true;
            }

            double minSkill, maxSkill;

            GetCastSkills(out minSkill, out maxSkill);

            if (DamageSkill != CastSkill)
            {
                Caster.CheckSkill(DamageSkill, 0.0, Caster.Skills[DamageSkill].Cap);
            }

            return Caster.CheckSkill(CastSkill, minSkill, maxSkill);
        }

MagerySpell.cs
- public override void GetCastSkills(out double min, out double max)
Code:
 public override void GetCastSkills(out double min, out double max)
        {
            if( this.Scroll is SpellScroll)
            {
                min = 0;
                max = 0;
            }
           
            int circle = (int)this.Circle;

            if (this.Scroll != null)
                circle -= 2;

            double avg = ChanceLength * circle;

            min = avg - ChanceOffset;
            max = avg + ChanceOffset;
        }
- public override int GetMana()
Code:
public override int GetMana()
        {
            if (this.Scroll is BaseWand)
                return 0;
               
            if( this.Scroll is SpellScroll)
                return 0;

            return m_ManaTable[(int)this.Circle];
        }
 
Back