Ninja Darts and Shuriken should use combat checks, never 100% chance of hit. Should trigger Evil Omen poison level increase. Missed shots should not consume poison chg, but empty ammo clears weapon poison. Code overhaul.

This commit is contained in:
xavier 2010-12-31 20:28:58 +00:00
parent c81a87394d
commit 33de7434c5
11 changed files with 520 additions and 571 deletions

View file

@ -633,13 +633,16 @@ namespace Server.Mobiles
return damage;
}
#endregion
#region Spill Acid
public void SpillAcid( int Amount )
{
SpillAcid( null, Amount );
}
public void SpillAcid( Mobile target, int Amount )
{
if ( (target != null && target.Map == null) || this.Map == null )
@ -676,10 +679,12 @@ namespace Server.Mobiles
Solen Style, override me for other mobiles/items:
kappa+acidslime, grizzles+whatever, etc.
*/
public virtual Item NewHarmfulItem()
{
return new PoolOfAcid( TimeSpan.FromSeconds(10), 30, 30 );
}
#endregion
#region Flee!!!
@ -714,6 +719,7 @@ namespace Server.Mobiles
{
m_EndFlee = DateTime.Now + maxDuration;
}
#endregion
public BaseAI AIObject{ get{ return m_AI; } }
@ -766,6 +772,7 @@ namespace Server.Mobiles
return ( m_iTeam == c.m_iTeam && ( (m_bSummoned || m_bControlled) == (c.m_bSummoned || c.m_bControlled) )/* && c.Combatant != this */);
}
#endregion
#region Allegiance
@ -803,6 +810,7 @@ namespace Server.Mobiles
return ( ethic == EthicAllegiance ? Allegiance.Ally : Allegiance.Enemy );
}
#endregion
public virtual bool IsEnemy( Mobile m )
@ -983,7 +991,7 @@ namespace Server.Mobiles
if ( Core.AOS && !this.Summoned && this.Controlled && 0.2 > Utility.RandomDouble() )
amount = (int)(amount * BonusPetDamageScalar);
if ( Spells.Necromancy.EvilOmenSpell.CheckEffect( this ) )
if ( Spells.Necromancy.EvilOmenSpell.TryEndEffect( this ) )
amount = (int)(amount * 1.25);
Mobile oath = Spells.Necromancy.BloodOathSpell.GetBloodOath( from );
@ -1032,7 +1040,7 @@ namespace Server.Mobiles
if ( !Alive || IsDeadPet )
return ApplyPoisonResult.Immune;
if ( Spells.Necromancy.EvilOmenSpell.CheckEffect( this ) )
if ( Spells.Necromancy.EvilOmenSpell.TryEndEffect( this ) )
poison = PoisonImpl.IncreaseLevel( poison );
ApplyPoisonResult result = base.ApplyPoison( from, poison );
@ -1318,6 +1326,7 @@ namespace Server.Mobiles
public virtual void AlterMeleeDamageTo( Mobile to, ref int damage )
{
}
#endregion
public virtual void CheckReflect( Mobile caster, ref bool reflect )
@ -2111,6 +2120,7 @@ namespace Server.Mobiles
public virtual bool CanAngerOnTame{ get{ return false; } }
#region OnAction[...]
public virtual void OnActionWander()
{
}
@ -2134,6 +2144,7 @@ namespace Server.Mobiles
public virtual void OnActionBackoff()
{
}
#endregion
public override bool OnDragDrop( Mobile from, Item dropped )
@ -2765,6 +2776,7 @@ namespace Server.Mobiles
* -Could add a FightMode.Prefered
*
*/
public virtual double GetFightModeRanking( Mobile m, FightMode acqType, bool bPlayerOnly )
{
if ( ( bPlayerOnly && m.Player ) || !bPlayerOnly )
@ -3060,6 +3072,7 @@ namespace Server.Mobiles
return false;
}
#endregion
public override void AggressiveAction( Mobile aggressor, bool criminal )
@ -3635,6 +3648,7 @@ namespace Server.Mobiles
}
#region Pack & Loot
public void PackPotion()
{
PackItem( Loot.RandomPotion() );
@ -4079,6 +4093,7 @@ namespace Server.Mobiles
if ( !item.Stackable || !pack.TryDropItem( this, item, false ) ) // try stack
pack.DropItem( item ); // failed, drop it anyway
}
#endregion
public override void OnDoubleClick( Mobile from )
@ -4922,6 +4937,7 @@ namespace Server.Mobiles
m_NextHealTime = DateTime.Now + TimeSpan.FromSeconds(MinHealDelay + (Utility.RandomDouble() * MaxHealDelay));
}
#endregion
public virtual void OnThink()