fix: Adds missing ML Abilities (#799)
This commit is contained in:
parent
4893094bb4
commit
5725fba373
27 changed files with 931 additions and 243 deletions
|
|
@ -12,33 +12,25 @@ namespace Server.Items
|
|||
|
||||
public override int BaseMana => 20;
|
||||
|
||||
// No longer active in pub21:
|
||||
/*public override bool CheckSkills( Mobile from )
|
||||
public override bool RequiresTactics(Mobile from) => from.Weapon is not BaseWeapon { Skill: SkillName.Wrestling };
|
||||
|
||||
// Disarm is special. Doesnt need tactics when wresling and tactics need is lower than fighting skill.
|
||||
public virtual double GetRequiredTactics(Mobile from)
|
||||
{
|
||||
if (!base.CheckSkills( from ))
|
||||
return false;
|
||||
|
||||
if (!(from.Weapon is Fists))
|
||||
return true;
|
||||
|
||||
Skill skill = from.Skills.ArmsLore;
|
||||
|
||||
if (skill?.Base >= 80.0)
|
||||
return true;
|
||||
|
||||
from.SendLocalizedMessage( 1061812 ); // You lack the required skill in armslore to perform that attack!
|
||||
|
||||
return false;
|
||||
}*/
|
||||
|
||||
public override bool RequiresTactics(Mobile from)
|
||||
{
|
||||
if (!(from.Weapon is BaseWeapon weapon))
|
||||
if (from.Weapon is BaseWeapon weapon)
|
||||
{
|
||||
return false;
|
||||
if (weapon.PrimaryAbility == this)
|
||||
{
|
||||
return 30.0;
|
||||
}
|
||||
|
||||
if (weapon.SecondaryAbility == this)
|
||||
{
|
||||
return 60.0;
|
||||
}
|
||||
}
|
||||
|
||||
return weapon.Skill != SkillName.Wrestling;
|
||||
return 200.0;
|
||||
}
|
||||
|
||||
public override void OnHit(Mobile attacker, Mobile defender, int damage)
|
||||
|
|
@ -52,7 +44,7 @@ namespace Server.Items
|
|||
|
||||
var toDisarm = defender.FindItemOnLayer(Layer.OneHanded);
|
||||
|
||||
if (toDisarm?.Movable == false)
|
||||
if (toDisarm?.Movable != false)
|
||||
{
|
||||
toDisarm = defender.FindItemOnLayer(Layer.TwoHanded);
|
||||
}
|
||||
|
|
@ -63,7 +55,7 @@ namespace Server.Items
|
|||
{
|
||||
attacker.SendLocalizedMessage(1004001); // You cannot disarm your opponent.
|
||||
}
|
||||
else if (!Core.ML && toDisarm == null || toDisarm is BaseShield || toDisarm is Spellbook)
|
||||
else if (!Core.ML && toDisarm == null || toDisarm is BaseShield or Spellbook)
|
||||
{
|
||||
attacker.SendLocalizedMessage(1060849); // Your target is already unarmed!
|
||||
}
|
||||
|
|
@ -77,6 +69,8 @@ namespace Server.Items
|
|||
|
||||
pack.DropItem(toDisarm);
|
||||
|
||||
BuffInfo.AddBuff(defender, new BuffInfo(BuffIcon.NoRearm, 1075637, BlockEquipDuration, defender));
|
||||
|
||||
BaseWeapon.BlockEquip(defender, BlockEquipDuration);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue