Fixes casting checks

This commit is contained in:
Kamron Batman 2018-08-19 01:38:55 +08:00
parent 7ea00fbf4f
commit 03dd5f1926
431 changed files with 5616 additions and 6250 deletions

View file

@ -23,7 +23,7 @@ namespace Server.Spells.Bushido
public override bool CheckCast()
{
if( VerifyCast( Caster, true ) )
if ( VerifyCast( Caster, true ) )
return base.CheckCast();
return false;
@ -31,12 +31,12 @@ namespace Server.Spells.Bushido
public static bool VerifyCast( Mobile Caster, bool messages )
{
if( Caster == null ) // Sanity
if ( Caster == null ) // Sanity
return false;
BaseWeapon weap = Caster.FindItemOnLayer( Layer.OneHanded ) as BaseWeapon;
if( weap == null )
if ( weap == null )
weap = Caster.FindItemOnLayer( Layer.TwoHanded ) as BaseWeapon;
if ( weap != null ) {
@ -107,7 +107,7 @@ namespace Server.Spells.Bushido
public override void OnCast()
{
if( CheckSequence() )
if ( CheckSequence() )
{
Caster.SendLocalizedMessage( 1063120 ); // You feel that you might be able to deflect any attack!
Caster.FixedParticles( 0x376A, 1, 20, 0x7F5, 0x960, 3, EffectLayer.Waist );
@ -142,15 +142,15 @@ namespace Server.Spells.Bushido
* o 6-7 seconds w/ GM+ Bushido and GM tactics/anatomy
*/
if( !Core.ML )
if ( !Core.ML )
return TimeSpan.FromSeconds( 8.0 );
double seconds = 3;
if( m.Skills.Bushido.Value > 60 )
if ( m.Skills.Bushido.Value > 60 )
seconds += (m.Skills.Bushido.Value - 60) / 20;
if( m.Skills.Anatomy.Value >= 100.0 && m.Skills.Tactics.Value >= 100.0 && m.Skills.Bushido.Value > 100.0 ) //Bushido being HIGHER than 100 for bonus is intended
if ( m.Skills.Anatomy.Value >= 100.0 && m.Skills.Tactics.Value >= 100.0 && m.Skills.Bushido.Value > 100.0 ) //Bushido being HIGHER than 100 for bonus is intended
seconds++;
return TimeSpan.FromSeconds( (int)seconds );
@ -167,15 +167,15 @@ namespace Server.Spells.Bushido
* o 42-50% bonus w/ GM+ bushido and GM tactics/anatomy
*/
if( !Core.ML )
if ( !Core.ML )
return 1.5;
double bonus = 0;
if( m.Skills.Bushido.Value >= 60 )
if ( m.Skills.Bushido.Value >= 60 )
bonus += ( ( ( m.Skills.Bushido.Value - 60 ) * .004 ) + 0.16 );
if( m.Skills.Anatomy.Value >= 100 && m.Skills.Tactics.Value >= 100 && m.Skills.Bushido.Value > 100 ) //Bushido being HIGHER than 100 for bonus is intended
if ( m.Skills.Anatomy.Value >= 100 && m.Skills.Tactics.Value >= 100 && m.Skills.Bushido.Value > 100 ) //Bushido being HIGHER than 100 for bonus is intended
bonus += 0.10;
return 1.0 + bonus;
@ -185,7 +185,7 @@ namespace Server.Spells.Bushido
{
Timer t = (Timer)m_Table[m];
if( t != null )
if ( t != null )
t.Stop();
t = new InternalTimer( m, GetEvadeDuration( m ) );
@ -199,7 +199,7 @@ namespace Server.Spells.Bushido
{
Timer t = (Timer)m_Table[m];
if( t != null )
if ( t != null )
t.Stop();
m_Table.Remove( m );