Fargariel

Initiate
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];
        }
 

Active Shards

  • Unchained
    Custom (Classic)
    • Players
    • 163 Online
    • 273 Peak
  • The Crossroads
    Mondain's Legacy
    • Players
    • 106 Online
    • 190 Peak
  • UO Eventine
    Custom (Classic)
    • Players
    • 80 Online
    • 137 Peak
  • Insane UO
    Endless Journey
    • Players
    • 76 Online
    • 105 Peak
  • CALYPSO
    Custom (Modern)
    • Players
    • 28 Online
    • 30 Peak
  • UO: New Renaissance
    Custom (Classic)
    • Players
    • 25 Online
    • 85 Peak
  • UO Phoenix
    Custom (Classic)
    • Players
    • 19 Online
    • 48 Peak
  • Pandora
    Custom (Modern)
    • Players
    • 19 Online
    • 32 Peak
  • UO Enigma
    Custom (Modern)
    • Players
    • 18 Online
    • 172 Peak
  • Arth
    Custom (Modern)
    • Players
    • 17 Online
    • 34 Peak

Donations

Total amount
$0.00
Goal
$500.00
Back