Fixes code according to modern code style. Fixes a few expression bugs.

This commit is contained in:
Kamron Batman 2018-09-15 09:58:51 -07:00
parent 89eea25e5f
commit 970fd563b2
3324 changed files with 441118 additions and 433755 deletions

View file

@ -1,41 +1,37 @@
namespace Server.Items
{
/// <summary>
/// Available on some crossbows, this special move allows archers to fire while on the move.
/// This shot is somewhat less accurate than normal, but the ability to fire while running is a clear advantage.
/// </summary>
public class MovingShot : WeaponAbility
{
public MovingShot()
{
}
/// <summary>
/// Available on some crossbows, this special move allows archers to fire while on the move.
/// This shot is somewhat less accurate than normal, but the ability to fire while running is a clear advantage.
/// </summary>
public class MovingShot : WeaponAbility
{
public override int BaseMana => 15;
public override int AccuracyBonus => -25;
public override int BaseMana => 15;
public override int AccuracyBonus => -25;
public override bool ValidatesDuringHit => false;
public override bool OnBeforeSwing( Mobile attacker, Mobile defender )
{
return ( Validate( attacker ) && CheckMana( attacker, true ) );
}
public override bool OnBeforeSwing(Mobile attacker, Mobile defender)
{
return Validate(attacker) && CheckMana(attacker, true);
}
public override void OnMiss( Mobile attacker, Mobile defender )
{
//Validates in OnSwing for accuracy scalar
public override void OnMiss(Mobile attacker, Mobile defender)
{
//Validates in OnSwing for accuracy scalar
ClearCurrentAbility( attacker );
ClearCurrentAbility(attacker);
attacker.SendLocalizedMessage( 1060089 ); // You fail to execute your special move
}
attacker.SendLocalizedMessage(1060089); // You fail to execute your special move
}
public override bool ValidatesDuringHit => false;
public override void OnHit(Mobile attacker, Mobile defender, int damage)
{
//Validates in OnSwing for accuracy scalar
public override void OnHit( Mobile attacker, Mobile defender, int damage )
{
//Validates in OnSwing for accuracy scalar
ClearCurrentAbility(attacker);
ClearCurrentAbility( attacker );
attacker.SendLocalizedMessage( 1060216 ); // Your shot was successful
}
}
}
attacker.SendLocalizedMessage(1060216); // Your shot was successful
}
}
}