Fixes code according to modern code style. Fixes a few expression bugs.
This commit is contained in:
parent
89eea25e5f
commit
970fd563b2
3324 changed files with 441118 additions and 433755 deletions
|
|
@ -1,55 +1,52 @@
|
|||
namespace Server.Items
|
||||
{
|
||||
/// <summary>
|
||||
/// The highly skilled warrior can use this special attack to make two quick swings in succession.
|
||||
/// Landing both blows would be devastating!
|
||||
/// </summary>
|
||||
public class DoubleStrike : WeaponAbility
|
||||
{
|
||||
public DoubleStrike()
|
||||
{
|
||||
}
|
||||
/// <summary>
|
||||
/// The highly skilled warrior can use this special attack to make two quick swings in succession.
|
||||
/// Landing both blows would be devastating!
|
||||
/// </summary>
|
||||
public class DoubleStrike : WeaponAbility
|
||||
{
|
||||
public override int BaseMana => 30;
|
||||
public override double DamageScalar => 0.9;
|
||||
|
||||
public override int BaseMana => 30;
|
||||
public override double DamageScalar => 0.9;
|
||||
public override void OnHit(Mobile attacker, Mobile defender, int damage)
|
||||
{
|
||||
if (!Validate(attacker) || !CheckMana(attacker, true))
|
||||
return;
|
||||
|
||||
public override void OnHit( Mobile attacker, Mobile defender, int damage )
|
||||
{
|
||||
if ( !Validate( attacker ) || !CheckMana( attacker, true ) )
|
||||
return;
|
||||
ClearCurrentAbility(attacker);
|
||||
|
||||
ClearCurrentAbility( attacker );
|
||||
attacker.SendLocalizedMessage(1060084); // You attack with lightning speed!
|
||||
defender.SendLocalizedMessage(1060085); // Your attacker strikes with lightning speed!
|
||||
|
||||
attacker.SendLocalizedMessage( 1060084 ); // You attack with lightning speed!
|
||||
defender.SendLocalizedMessage( 1060085 ); // Your attacker strikes with lightning speed!
|
||||
defender.PlaySound(0x3BB);
|
||||
defender.FixedEffect(0x37B9, 244, 25);
|
||||
|
||||
defender.PlaySound( 0x3BB );
|
||||
defender.FixedEffect( 0x37B9, 244, 25 );
|
||||
// Swing again:
|
||||
|
||||
// Swing again:
|
||||
// If no combatant, wrong map, one of us is a ghost, or cannot see, or deleted, then stop combat
|
||||
if (defender == null || defender.Deleted || attacker.Deleted || defender.Map != attacker.Map ||
|
||||
!defender.Alive || !attacker.Alive || !attacker.CanSee(defender))
|
||||
{
|
||||
attacker.Combatant = null;
|
||||
return;
|
||||
}
|
||||
|
||||
// If no combatant, wrong map, one of us is a ghost, or cannot see, or deleted, then stop combat
|
||||
if ( defender == null || defender.Deleted || attacker.Deleted || defender.Map != attacker.Map || !defender.Alive || !attacker.Alive || !attacker.CanSee( defender ) )
|
||||
{
|
||||
attacker.Combatant = null;
|
||||
return;
|
||||
}
|
||||
IWeapon weapon = attacker.Weapon;
|
||||
|
||||
IWeapon weapon = attacker.Weapon;
|
||||
if (weapon == null)
|
||||
return;
|
||||
|
||||
if ( weapon == null )
|
||||
return;
|
||||
if (!attacker.InRange(defender, weapon.MaxRange))
|
||||
return;
|
||||
|
||||
if ( !attacker.InRange( defender, weapon.MaxRange ) )
|
||||
return;
|
||||
|
||||
if ( attacker.InLOS( defender ) )
|
||||
{
|
||||
BaseWeapon.InDoubleStrike = true;
|
||||
attacker.RevealingAction();
|
||||
attacker.NextCombatTime = Core.TickCount + (int)weapon.OnSwing(attacker, defender).TotalMilliseconds;
|
||||
BaseWeapon.InDoubleStrike = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (attacker.InLOS(defender))
|
||||
{
|
||||
BaseWeapon.InDoubleStrike = true;
|
||||
attacker.RevealingAction();
|
||||
attacker.NextCombatTime = Core.TickCount + (int)weapon.OnSwing(attacker, defender).TotalMilliseconds;
|
||||
BaseWeapon.InDoubleStrike = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue