mirror of
https://github.com/runuo/runuo
synced 2026-08-11 22:26:04 -04:00
http://www.uodemise.com/forum/showthread.php?t=145364 BOD turn-in should have 10 second timer since pub 50 http://www.uodemise.com/forum/showthread.php?t=156441 Vet reward ore carts, gem carts, and stumps have missing range check added http://www.uodemise.com/forum/showthread.php?t=156380 Blood Oath: missing 35hp pvp dmg cap added, correct credit for kills/dmg given to caster, ML magic resist now applies. http://www.uodemise.com/forum/showthread.php?t=118729&page=3 Missing ore sizes added http://www.uodemise.com/forum/showthread.php?t=119888 Player-cast gates reveal stealthers/hiders. http://www.uodemise.com/forum/showthread.php?t=149218 Some necro spells should disturb a casting target http://www.uodemise.com/forum/showthread.php?t=149361 Failed snoop attempts should reveal thief if hidden. http://www.uodemise.com/forum/showthread.php?t=153962 Pets do not autostable in the case of a server restart/cash: fixed http://www.uodemise.com/forum/showthread.php?t=122745 Misc Aesthetic changes to spells, etc. earthquake wrong sound magic arrow inappropriate particles curse wrong sound agility wrong sound chain lightning should always play sound poison wrong sound dispel evil missing sound noble sacrifice male/female, diff sounds sacred journey missing sound
97 lines
No EOL
2.1 KiB
C#
97 lines
No EOL
2.1 KiB
C#
using System;
|
|
using Server.Targeting;
|
|
using Server.Network;
|
|
|
|
namespace Server.Spells.First
|
|
{
|
|
public class MagicArrowSpell : MagerySpell
|
|
{
|
|
private static SpellInfo m_Info = new SpellInfo(
|
|
"Magic Arrow", "In Por Ylem",
|
|
212,
|
|
9041,
|
|
Reagent.SulfurousAsh
|
|
);
|
|
|
|
public override SpellCircle Circle { get { return SpellCircle.First; } }
|
|
|
|
public MagicArrowSpell( Mobile caster, Item scroll ) : base( caster, scroll, m_Info )
|
|
{
|
|
}
|
|
|
|
public override bool DelayedDamageStacking { get { return !Core.AOS; } }
|
|
|
|
public override void OnCast()
|
|
{
|
|
Caster.Target = new InternalTarget( this );
|
|
}
|
|
|
|
public override bool DelayedDamage{ get{ return true; } }
|
|
|
|
public void Target( Mobile m )
|
|
{
|
|
if ( !Caster.CanSee( m ) )
|
|
{
|
|
Caster.SendLocalizedMessage( 500237 ); // Target can not be seen.
|
|
}
|
|
else if ( CheckHSequence( m ) )
|
|
{
|
|
Mobile source = Caster;
|
|
|
|
SpellHelper.Turn( source, m );
|
|
|
|
SpellHelper.CheckReflect( (int)this.Circle, ref source, ref m );
|
|
|
|
double damage;
|
|
|
|
if ( Core.AOS )
|
|
{
|
|
damage = GetNewAosDamage( 10, 1, 4, m );
|
|
}
|
|
else
|
|
{
|
|
damage = Utility.Random( 4, 4 );
|
|
|
|
if ( CheckResisted( m ) )
|
|
{
|
|
damage *= 0.75;
|
|
|
|
m.SendLocalizedMessage( 501783 ); // You feel yourself resisting magical energy.
|
|
}
|
|
|
|
damage *= GetDamageScalar( m );
|
|
}
|
|
|
|
source.MovingParticles( m, 0x36E4, 5, 0, false, false, 3006, 0, 0 );
|
|
source.PlaySound( 0x1E5 );
|
|
|
|
SpellHelper.Damage( this, m, damage, 0, 100, 0, 0, 0 );
|
|
}
|
|
|
|
FinishSequence();
|
|
}
|
|
|
|
private class InternalTarget : Target
|
|
{
|
|
private MagicArrowSpell m_Owner;
|
|
|
|
public InternalTarget( MagicArrowSpell owner ) : base( Core.ML ? 10 : 12, false, TargetFlags.Harmful )
|
|
{
|
|
m_Owner = owner;
|
|
}
|
|
|
|
protected override void OnTarget( Mobile from, object o )
|
|
{
|
|
if ( o is Mobile )
|
|
{
|
|
m_Owner.Target( (Mobile)o );
|
|
}
|
|
}
|
|
|
|
protected override void OnTargetFinish( Mobile from )
|
|
{
|
|
m_Owner.FinishSequence();
|
|
}
|
|
}
|
|
}
|
|
} |