partial psz patch

This commit is contained in:
mark 2009-06-21 05:43:18 +00:00
parent d03acbffaf
commit 869f68488d
23 changed files with 15471 additions and 19 deletions

View file

@ -84,9 +84,11 @@ namespace Server.Items
to.Damage( 1, from );
IMount mt = to.Mount;
if ( to is ChaosDragoon || to is ChaosDragoonElite )
from.SendLocalizedMessage( 1042047 ); // You fail to knock the rider from its mount.
if ( mt != null )
IMount mt = to.Mount;
if ( mt != null && !( to is ChaosDragoon || to is ChaosDragoonElite ) )
mt.Rider = null;
to.SendLocalizedMessage( 1040023 ); // You have been knocked off of your mount!

View file

@ -39,6 +39,9 @@ namespace Server.Items
if ( !Validate( attacker ) )
return;
if ( defender is ChaosDragoon || defender is ChaosDragoonElite )
return;
if ( attacker.Mounted && !(defender.Weapon is Lance) ) // TODO: Should there be a message here?
return;

View file

@ -0,0 +1,49 @@
using System;
namespace Server.Items
{
/// <summary>
/// This attack allows you to disrobe your foe.
/// </summary>
public class Disrobe : WeaponAbility
{
public Disrobe()
{
}
public override int BaseMana{ get{ return 20; } } // Not Sure what amount of mana a creature uses.
public static readonly TimeSpan BlockEquipDuration = TimeSpan.FromSeconds( 5.0 );
public override void OnHit( Mobile attacker, Mobile defender, int damage )
{
if ( !Validate( attacker ) )
return;
ClearCurrentAbility( attacker );
Item toDisrobe = defender.FindItemOnLayer(Layer.InnerTorso);
if ( toDisrobe == null || !toDisrobe.Movable )
toDisrobe = defender.FindItemOnLayer( Layer.OuterTorso );
Container pack = defender.Backpack;
if ( pack == null || toDisrobe == null || !toDisrobe.Movable )
{
attacker.SendLocalizedMessage(1004001); // You cannot disarm your opponent.
}
else if ( CheckMana( attacker, true ) )
{
//attacker.SendLocalizedMessage( 1060092 ); // You disarm their weapon!
defender.SendLocalizedMessage(1062002); // You can no longer wear your ~1_ARMOR~
defender.PlaySound( 0x3B9 );
//defender.FixedParticles( 0x37BE, 232, 25, 9948, EffectLayer.InnerTorso );
pack.DropItem( toDisrobe );
BaseWeapon.BlockEquip( defender, BlockEquipDuration );
}
}
}
}

View file

@ -164,7 +164,7 @@ namespace Server.Items
return CheckSkills( from ) && CheckMana( from, false );
}
private static WeaponAbility[] m_Abilities = new WeaponAbility[30]
private static WeaponAbility[] m_Abilities = new WeaponAbility[31]
{
null,
new ArmorIgnore(),
@ -185,18 +185,19 @@ namespace Server.Items
new FrenziedWhirlwind(),
new Block(),
new DefenseMastery(),
new NerveStrike(),
new TalonStrike(),
new Feint(),
new DualWield(),
new DoubleShot(),
new ArmorPierce(),
null,
null,
null,
null,
null,
null
new NerveStrike(),
new TalonStrike(),
new Feint(),
new DualWield(),
new DoubleShot(),
new ArmorPierce(),
null,
null,
null,
null,
null,
null,
new Disrobe()
};
public static WeaponAbility[] Abilities{ get{ return m_Abilities; } }
@ -237,6 +238,8 @@ namespace Server.Items
public static readonly WeaponAbility SerpentArrow = m_Abilities[28];
public static readonly WeaponAbility ForceOfNature = m_Abilities[29];
public static readonly WeaponAbility Disrobe = m_Abilities[30];
public static bool IsWeaponAbility( Mobile m, WeaponAbility a )
{
if ( a == null )