diff --git a/Scripts/Items/Weapons/BaseWeapon.cs b/Scripts/Items/Weapons/BaseWeapon.cs index a41ae08..7fd57ab 100644 --- a/Scripts/Items/Weapons/BaseWeapon.cs +++ b/Scripts/Items/Weapons/BaseWeapon.cs @@ -1087,7 +1087,24 @@ namespace Server.Items public virtual int ComputeDamage( Mobile attacker, Mobile defender ) { - return (int)ScaleDamageOld( attacker, GetBaseDamage( attacker ), true ); + //return (int)ScaleDamageOld( attacker, GetBaseDamage( attacker ), true ); + int damage = (int)ScaleDamageOld( attacker, GetBaseDamage( attacker ), true ); + + // Ranger Ambush Mechanic + if ( this is BaseRanged ) + { + double distance = Server.SkillHandlers.Tracking.GetStalkingBonus( attacker, defender ); + + if ( distance > 0 ) + { + double bonusMultiplier = distance * 0.05; + damage += (int)(damage * bonusMultiplier); + + attacker.SendMessage( "You land a devastating ambush shot on your quarry!" ); + } + } + + return damage; } public virtual void PlayHurtAnimation( Mobile from ) diff --git a/Scripts/Skills/Tracking.cs b/Scripts/Skills/Tracking.cs index e861bbf..0416042 100644 --- a/Scripts/Skills/Tracking.cs +++ b/Scripts/Skills/Tracking.cs @@ -94,19 +94,19 @@ namespace Server.SkillHandlers AddBackground( 10, 10, 420, 75, 2620 ); AddBackground( 10, 85, 420, 25, 3000 ); - AddItem( 20, 20, 9682 ); + AddItem( 20, 20, 0x2080 ); AddButton( 20, 110, 4005, 4007, 1, GumpButtonType.Reply, 0 ); AddHtmlLocalized( 20, 90, 100, 20, 1018087, false, false ); // Animals - AddItem( 120, 20, 9607 ); + AddItem( 120, 20, 0x2098 ); AddButton( 120, 110, 4005, 4007, 2, GumpButtonType.Reply, 0 ); AddHtmlLocalized( 120, 90, 100, 20, 1018088, false, false ); // Monsters - AddItem( 220, 20, 8454 ); + AddItem( 220, 20, 0x208C ); AddButton( 220, 110, 4005, 4007, 3, GumpButtonType.Reply, 0 ); AddHtmlLocalized( 220, 90, 100, 20, 1018089, false, false ); // Human NPCs - AddItem( 320, 20, 8455 ); + AddItem( 320, 20, 0x208A ); AddButton( 320, 110, 4005, 4007, 4, GumpButtonType.Reply, 0 ); AddHtmlLocalized( 320, 90, 100, 20, 1018090, false, false ); // Players } @@ -345,6 +345,7 @@ namespace Server.SkillHandlers Mobile m = m_List[index]; m_From.QuestArrow = new TrackArrow( m_From, m, m_Range * 2 ); + Tracking.AddInfo( m_From, m ); } } } @@ -425,4 +426,4 @@ namespace Server.SkillHandlers } } } -} \ No newline at end of file +}