RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Having some difficulties with Dispel

Corrado

Sorceror
I've having trouble with two things that have to do with Dispel.

The first is that 8th Circle summoned creatures are VERY difficult to dispel, even at GM magery. I've tried adjusting their DispelDifficulty and DispelFocus but it doesn't seem to make any difference. An Energy Vortex for example has a DispelDifficulty of 80 and a DispelFocus of 20, a Summoned Daemon is 125 and 45. I can set the Daemon to be the same as the EV and still can't dispel the Daemon, but can Dispel the EV fairly easily. I've even tried setting the DispelDifficulty to 0, it's still VERY tough to dispel them.

The second problem I'm having is that Dispel flags you as an attacker when you use it. If you dispel your own blue summoned creature it flags you gray. I've tried changing the TargetFlags.Harmful to TargetFlags.None, or even TargetFlags.Beneficial but it made no difference. I definitely don't want players going gray for dispelling blue creatures, I'd be fine with it not being an aggressive act at all for any creature you try to dispel.

If anyone can help with these issues I'd greatly appreciate it.
 

Corrado

Sorceror
Alright, I found out why I wasn't able to change the dispel chance, I was changing the chance in SummonedDaemon.cs, but on a non-AOS shard it uses the regular Daemon.cs for the 8th circle spell Summon Daemon. I changed the dispel difficulty in that file, as well as the Summoned Elementals and it is now working fine.

Still having trouble with Dispel flagging you gray when used on a blue summon however...
 

Khaz

Knight
Looks like the spell is using CheckHSequence() in the OnTarget(...) method, which causes a harmful action to be taken against the target. If you change it to use CheckSequence() instead, it'll probably solve your problem of flagging gray against blue targets.

Code:
protected override void OnTarget( Mobile from, object o )
{
    if( o is Mobile )
    {
        Mobile m = (Mobile)o;
        BaseCreature bc = m as BaseCreature;
 
        if( !from.CanSee( m ) )
        {
            from.SendLocalizedMessage( 500237 ); // Target can not be seen.
        }
        else if( bc == null || !bc.IsDispellable )
        {
            from.SendLocalizedMessage( 1005049 ); // That cannot be dispelled.
        }
        else if( m_Owner.CheckHSequence( m ) )
        {
            SpellHelper.Turn( from, m );
 
            double dispelChance = (50.0 + ((100 * (from.Skills.Magery.Value - bc.DispelDifficulty)) / (bc.DispelFocus * 2))) / 100;
 
            if( dispelChance > Utility.RandomDouble() )
            {
                Effects.SendLocationParticles( EffectItem.Create( m.Location, m.Map, EffectItem.DefaultDuration ), 0x3728, 8, 20, 5042 );
                Effects.PlaySound( m, m.Map, 0x201 );
 
                m.Delete();
            }
            else
            {
                m.FixedEffect( 0x3779, 10, 20 );
                from.SendLocalizedMessage( 1010084 ); // The creature resisted the attempt to dispel it!
            }
        }
    }
}
 

Corrado

Sorceror
Thank you Khaz, that did the trick!

I don't know why it never occurred to me what the differences between CheckBSequence, CheckHSequence, and CheckSequence were until now hehe.
 
Top