fix: Adds missing ML Abilities (#799)

This commit is contained in:
IAmDanielDinner 2021-10-04 08:04:06 +02:00 • committed by GitHub
parent 4893094bb4
commit 5725fba373
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
27 changed files with 931 additions and 243 deletions

View file

@ -11,18 +11,7 @@ namespace Server.Items
public static Dictionary<Mobile, FeintTimer> Registry { get; } = new();
public override int BaseMana => 30;
public override bool CheckSkills(Mobile from)
{
if (GetSkill(from, SkillName.Ninjitsu) < 50.0 && GetSkill(from, SkillName.Bushido) < 50.0)
{
// You need ~1_SKILL_REQUIREMENT~ Bushido or Ninjitsu skill to perform that attack!
from.SendLocalizedMessage(1063347, "50");
return false;
}
return base.CheckSkills(from);
}
public override bool RequiresSecondarySkill(Mobile from) => true;
public override void OnHit(Mobile attacker, Mobile defender, int damage)
{
@ -46,10 +35,8 @@ namespace Server.Items
timer = new FeintTimer(
defender,
(int)(20.0 + 3.0 * (Math.Max(
attacker.Skills.Ninjitsu.Value,
attacker.Skills.Bushido.Value
) - 50.0) / 7.0)
(int)(20.0 + 3.0 *
(Math.Max(attacker.Skills.Ninjitsu.Value, attacker.Skills.Bushido.Value) - 50.0) / 7.0)
); // 20-50 % decrease
timer.Start();