protected override void OnTarget(Mobile from, object targeted) { if (m_Dagger.Deleted) { return; } else if (!from.Items.Contains(m_Dagger)) { from.SendMessage("You must be holding that weapon to use it."); } else if (targeted is Mobile) { Mobile m = (Mobile)targeted; if (m != from && from.HarmfulCheck(m)) { Direction to = from.GetDirectionTo(m); from.Direction = to; from.Animate(from.Mounted ? 26 : 9, 7, 1, true, false, 0); if (Utility.RandomDouble() >= (Math.Sqrt(m.Dex / 100.0) * 0.8)) { from.MovingEffect(m, 0x1BFE, 7, 1, false, false, 0x481, 0); AOS.Damage(m, from, Utility.Random(5, from.Str / 10), 100, 0, 0, 0, 0); m_Dagger.MoveToWorld(m.Location, m.Map); } else { int x = 0, y = 0; switch (to & Direction.Mask) { case Direction.North: --y; break; case Direction.South: ++y; break; case Direction.West: --x; break; case Direction.East: ++x; break; case Direction.Up: --x; --y; break; case Direction.Down: ++x; ++y; break; case Direction.Left: --x; ++y; break; case Direction.Right: ++x; --y; break; } x += Utility.Random(-1, 3); y += Utility.Random(-1, 3); x += m.X; y += m.Y; m_Dagger.MoveToWorld(new Point3D(x, y, m.Z), m.Map); from.MovingEffect(m_Dagger, 0x1BFE, 7, 1, false, false, 0x481, 0); from.SendMessage("You miss."); } } } }
protected override void OnTarget(Mobile from, object targeted) { if (m_Dagger.Deleted) { return; } else if (!from.Items.Contains(m_Dagger)) { from.SendMessage("You must be holding that weapon to use it."); } else if (targeted is Mobile) { Mobile m = (Mobile)targeted; if (m != from && from.HarmfulCheck(m)) { Direction to = from.GetDirectionTo(m); from.Direction = to; from.Animate(from.Mounted ? 26 : 9, 7, 1, true, false, 0); // if ( Utility.RandomDouble() >= (Math.Sqrt( m.Dex / 100.0 ) * 0.8) ) // if (from.CheckSkill(SkillName.ArmsLore, from.Skills[SkillName.ArmsLore].Value, 100)) if (from.CheckSkill(SkillName.ArmsLore, 0, 105)) { from.MovingEffect(m, 0x1BFE, 7, 1, false, false, 0x481, 0); int DaggerDmg = Utility.RandomMinMax((int)(from.Str / 15), (int)(from.Str / 5)); if (from is TeiravonMobile && (((TeiravonMobile)from).IsAssassin() || ((TeiravonMobile)from).IsThief())) { DaggerDmg += (int)(((TeiravonMobile)from).PlayerLevel / 1.25); } m_Dagger.MoveToWorld(m.Location, m.Map); AOS.Damage(m, from, DaggerDmg, 100, 0, 0, 0, 0); } else { int x = 0, y = 0; switch (to & Direction.Mask) { case Direction.North: --y; break; case Direction.South: ++y; break; case Direction.West: --x; break; case Direction.East: ++x; break; case Direction.Up: --x; --y; break; case Direction.Down: ++x; ++y; break; case Direction.Left: --x; ++y; break; case Direction.Right: ++x; --y; break; } x += Utility.Random(-1, 3); y += Utility.Random(-1, 3); x += m.X; y += m.Y; m_Dagger.MoveToWorld(new Point3D(x, y, m.Z), m.Map); from.MovingEffect(m_Dagger, 0x1BFE, 7, 1, false, false, 0x481, 0); from.SendMessage("You miss."); } } } }
protected override void OnTarget(Mobile from, object targeted) { if (m_Dagger.Deleted) { return; } else if (!from.Items.Contains(m_Dagger)) { from.SendMessage("You must be holding that weapon to use it."); } else if (targeted is Mobile) { Mobile m = (Mobile)targeted; if (m != from && from.HarmfulCheck(m)) { Direction to = from.GetDirectionTo(m); from.Direction = to; from.Animate(from.Mounted ? 26 : 9, 7, 1, true, false, 0); if (from.CheckTargetSkill(SkillName.Throwing, m, 0.0, 60.00)) { from.MovingEffect(m, 0x1BFE, 7, 1, false, false, 0x481, 0); int distance = (int)from.GetDistanceToSqrt(m.Location); int mindamage = m_Dagger.MinDamage; if (from.Dex > 100) { mindamage += 2; } distance -= (int)from.Skills[SkillName.Tactics].Value / 20; if (distance < 0) { distance = 0; } int count = (int)from.Skills[SkillName.Throwing].Value / 10; count += (int)from.Skills[SkillName.Anatomy].Value / 20; if (distance > 6) { count -= distance - 5; } AOS.Damage(m, from, Utility.Random(mindamage, count) - distance / 2, true, 0, 0, 0, 0, 0, 0, 100, false, false, false); m_Dagger.MoveToWorld(m.Location, m.Map); } else { int x = 0, y = 0; switch (to & Direction.Mask) { case Direction.North: --y; break; case Direction.South: ++y; break; case Direction.West: --x; break; case Direction.East: ++x; break; case Direction.Up: --x; --y; break; case Direction.Down: ++x; ++y; break; case Direction.Left: --x; ++y; break; case Direction.Right: ++x; --y; break; } x += Utility.Random(-1, 3); y += Utility.Random(-1, 3); x += m.X; y += m.Y; m_Dagger.MoveToWorld(new Point3D(x, y, m.Z), m.Map); from.MovingEffect(m_Dagger, 0x1BFE, 7, 1, false, false, 0x481, 0); m_Dagger.HitPoints -= 1; from.SendMessage("You miss."); } m_Dagger.HitPoints -= 1; } } }