fix: Reverts changes to fists (#1087)
This commit is contained in:
parent
792f04a323
commit
087cc15f39
1 changed files with 74 additions and 87 deletions
|
|
@ -35,7 +35,7 @@ namespace Server.Items
|
||||||
public override WeaponType DefType => WeaponType.Fists;
|
public override WeaponType DefType => WeaponType.Fists;
|
||||||
public override WeaponAnimation DefAnimation => WeaponAnimation.Wrestle;
|
public override WeaponAnimation DefAnimation => WeaponAnimation.Wrestle;
|
||||||
|
|
||||||
public static void Configure()
|
public static void Initialize()
|
||||||
{
|
{
|
||||||
Mobile.DefaultWeapon = new Fists();
|
Mobile.DefaultWeapon = new Fists();
|
||||||
|
|
||||||
|
|
@ -55,105 +55,97 @@ namespace Server.Items
|
||||||
|
|
||||||
private void CheckPreAOSMoves(Mobile attacker, Mobile defender)
|
private void CheckPreAOSMoves(Mobile attacker, Mobile defender)
|
||||||
{
|
{
|
||||||
|
if (!attacker.CanBeginAction<Fists>())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (attacker.StunReady)
|
if (attacker.StunReady)
|
||||||
{
|
{
|
||||||
if (attacker.CanBeginAction<Fists>())
|
if (attacker.Skills.Anatomy.Value < 80.0 || attacker.Skills.Wrestling.Value < 80.0)
|
||||||
{
|
{
|
||||||
if (attacker.Skills.Anatomy.Value >= 80.0 &&
|
attacker.SendLocalizedMessage(1004008); // You are not skilled enough to stun your opponent.
|
||||||
attacker.Skills.Wrestling.Value >= 80.0)
|
attacker.StunReady = false;
|
||||||
{
|
return;
|
||||||
if (attacker.Stam >= 15)
|
}
|
||||||
{
|
|
||||||
attacker.Stam -= 15;
|
|
||||||
|
|
||||||
if (CheckMove(attacker, SkillName.Anatomy))
|
if (attacker.Stam < 15)
|
||||||
{
|
{
|
||||||
StartMoveDelay(attacker);
|
attacker.SendLocalizedMessage(1004009); // You are too fatigued to attempt anything.
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
attacker.StunReady = false;
|
attacker.Stam -= 15;
|
||||||
|
|
||||||
attacker.SendLocalizedMessage(1004013); // You successfully stun your opponent!
|
if (CheckMove(attacker, SkillName.Anatomy))
|
||||||
defender.SendLocalizedMessage(1004014); // You have been stunned!
|
{
|
||||||
|
StartMoveDelay(attacker);
|
||||||
|
|
||||||
defender.Freeze(TimeSpan.FromSeconds(4.0));
|
attacker.StunReady = false;
|
||||||
}
|
|
||||||
else
|
attacker.SendLocalizedMessage(1004013); // You successfully stun your opponent!
|
||||||
{
|
defender.SendLocalizedMessage(1004014); // You have been stunned!
|
||||||
attacker.SendLocalizedMessage(1004010); // You failed in your attempt to stun.
|
|
||||||
defender.SendLocalizedMessage(1004011); // Your opponent tried to stun you and failed.
|
defender.Freeze(TimeSpan.FromSeconds(4.0));
|
||||||
}
|
}
|
||||||
}
|
else
|
||||||
else
|
{
|
||||||
{
|
attacker.SendLocalizedMessage(1004010); // You failed in your attempt to stun.
|
||||||
attacker.SendLocalizedMessage(1004009); // You are too fatigued to attempt anything.
|
defender.SendLocalizedMessage(1004011); // Your opponent tried to stun you and failed.
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
attacker.SendLocalizedMessage(1004008); // You are not skilled enough to stun your opponent.
|
|
||||||
attacker.StunReady = false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (attacker.DisarmReady)
|
else if (attacker.DisarmReady)
|
||||||
{
|
{
|
||||||
if (attacker.CanBeginAction<Fists>())
|
if (!defender.Player && !defender.Body.IsHuman)
|
||||||
{
|
{
|
||||||
if (defender.Player || defender.Body.IsHuman)
|
attacker.SendLocalizedMessage(1004001); // You cannot disarm your opponent.
|
||||||
{
|
return;
|
||||||
if (attacker.Skills.ArmsLore.Value >= 80.0 &&
|
}
|
||||||
attacker.Skills.Wrestling.Value >= 80.0)
|
|
||||||
{
|
|
||||||
if (attacker.Stam >= 15)
|
|
||||||
{
|
|
||||||
var toDisarm = defender.FindItemOnLayer(Layer.OneHanded);
|
|
||||||
|
|
||||||
if (toDisarm?.Movable == false)
|
if (attacker.Skills.ArmsLore.Value < 80.0 || attacker.Skills.Wrestling.Value < 80.0)
|
||||||
{
|
{
|
||||||
toDisarm = defender.FindItemOnLayer(Layer.TwoHanded);
|
attacker.SendLocalizedMessage(1004002); // You are not skilled enough to disarm your opponent.
|
||||||
}
|
attacker.DisarmReady = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var pack = defender.Backpack;
|
if (attacker.Stam < 15)
|
||||||
|
{
|
||||||
|
attacker.SendLocalizedMessage(1004003); // You are too fatigued to attempt anything.
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (pack == null || toDisarm?.Movable == false)
|
var toDisarm = defender.FindItemOnLayer(Layer.OneHanded);
|
||||||
{
|
|
||||||
attacker.SendLocalizedMessage(1004001); // You cannot disarm your opponent.
|
|
||||||
}
|
|
||||||
else if (CheckMove(attacker, SkillName.ArmsLore))
|
|
||||||
{
|
|
||||||
StartMoveDelay(attacker);
|
|
||||||
|
|
||||||
attacker.Stam -= 15;
|
if (toDisarm?.Movable == false)
|
||||||
attacker.DisarmReady = false;
|
{
|
||||||
|
toDisarm = defender.FindItemOnLayer(Layer.TwoHanded);
|
||||||
|
}
|
||||||
|
|
||||||
attacker.SendLocalizedMessage(1004006); // You successfully disarm your opponent!
|
var pack = defender.Backpack;
|
||||||
defender.SendLocalizedMessage(1004007); // You have been disarmed!
|
|
||||||
|
|
||||||
pack.DropItem(toDisarm);
|
if (pack == null || toDisarm?.Movable == false)
|
||||||
}
|
{
|
||||||
else
|
attacker.SendLocalizedMessage(1004001); // You cannot disarm your opponent.
|
||||||
{
|
}
|
||||||
attacker.Stam -= 15;
|
else if (CheckMove(attacker, SkillName.ArmsLore))
|
||||||
|
{
|
||||||
|
StartMoveDelay(attacker);
|
||||||
|
|
||||||
attacker.SendLocalizedMessage(1004004); // You failed in your attempt to disarm.
|
attacker.Stam -= 15;
|
||||||
defender.SendLocalizedMessage(1004005); // Your opponent tried to disarm you but failed.
|
attacker.DisarmReady = false;
|
||||||
}
|
|
||||||
}
|
attacker.SendLocalizedMessage(1004006); // You successfully disarm your opponent!
|
||||||
else
|
defender.SendLocalizedMessage(1004007); // You have been disarmed!
|
||||||
{
|
|
||||||
attacker.SendLocalizedMessage(1004003); // You are too fatigued to attempt anything.
|
pack.DropItem(toDisarm);
|
||||||
}
|
}
|
||||||
}
|
else
|
||||||
else
|
{
|
||||||
{
|
attacker.Stam -= 15;
|
||||||
attacker.SendLocalizedMessage(1004002); // You are not skilled enough to disarm your opponent.
|
|
||||||
attacker.DisarmReady = false;
|
attacker.SendLocalizedMessage(1004004); // You failed in your attempt to disarm.
|
||||||
}
|
defender.SendLocalizedMessage(1004005); // Your opponent tried to disarm you but failed.
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
attacker.SendLocalizedMessage(1004001); // You cannot disarm your opponent.
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -238,12 +230,7 @@ namespace Server.Items
|
||||||
|
|
||||||
private static void EventSink_StunRequest(Mobile m)
|
private static void EventSink_StunRequest(Mobile m)
|
||||||
{
|
{
|
||||||
if (Core.AOS)
|
if (Core.AOS || !DuelContext.AllowSpecialAbility(m, "Stun", true))
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!DuelContext.AllowSpecialAbility(m, "Stun", true))
|
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue