Sound/effect fixes, DeathStrike instant damage after 5 steps, Evasion of spells, with OSI data. Original data c/o Kenko
This commit is contained in:
parent
2cbc73ee85
commit
f67a870208
10 changed files with 309 additions and 205 deletions
|
|
@ -16,14 +16,24 @@ namespace Server.Spells.Bushido
|
|||
9002
|
||||
);
|
||||
|
||||
public override double RequiredSkill{ get{ return 60.0; } }
|
||||
public override int RequiredMana{ get{ return 10; } }
|
||||
public override double RequiredSkill { get { return 60.0; } }
|
||||
public override int RequiredMana { get { return 10; } }
|
||||
|
||||
public override bool CheckCast()
|
||||
{
|
||||
if( VerifyCast( Caster, true ) )
|
||||
return base.CheckCast();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static bool VerifyCast( Mobile Caster, bool messages )
|
||||
{
|
||||
if( Caster == null ) //sanity
|
||||
return false;
|
||||
|
||||
if( Caster.FindItemOnLayer( Layer.TwoHanded ) as BaseShield != null )
|
||||
return base.CheckCast();
|
||||
return true;
|
||||
|
||||
//Intentional having a Shield check override all.
|
||||
|
||||
|
|
@ -37,18 +47,35 @@ namespace Server.Spells.Bushido
|
|||
if( Core.ML && Caster.Skills[weap.Skill].Base < 50 )
|
||||
{
|
||||
//UBW and Mage weapon have no bearing on this, nor do skill items and such.
|
||||
Caster.SendLocalizedMessage( 1076206 ); // Your skill with your equipped weapon must be 50 or higher to use Evasion.
|
||||
if( messages )
|
||||
Caster.SendLocalizedMessage( 1076206 ); // Your skill with your equipped weapon must be 50 or higher to use Evasion.
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
return base.CheckCast();
|
||||
return true;
|
||||
}
|
||||
|
||||
Caster.SendLocalizedMessage( 1062944 ); // You must have a weapon or a shield equipped to use this ability!
|
||||
if( messages )
|
||||
Caster.SendLocalizedMessage( 1062944 ); // You must have a weapon or a shield equipped to use this ability!
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public Evasion( Mobile caster, Item scroll ) : base( caster, scroll, m_Info )
|
||||
public static bool CheckSpellEvasion( Mobile defender )
|
||||
{
|
||||
if( IsEvading( defender ) && VerifyCast( defender, false ) && BaseWeapon.CheckParry( defender ) ) //As per OSI, uses the exact same parry code
|
||||
{
|
||||
defender.Emote( "*evades*" ); //Yes. Eew. Blame OSI.
|
||||
defender.FixedEffect( 0x37B9, 10, 16 );
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public Evasion( Mobile caster, Item scroll )
|
||||
: base( caster, scroll, m_Info )
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -61,11 +88,10 @@ 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, 0x3, EffectLayer.Waist );
|
||||
Caster.FixedParticles( 0x376A, 1, 20, 0x7F5, 0x960, 3, EffectLayer.Waist );
|
||||
Caster.PlaySound( 0x51B );
|
||||
|
||||
OnCastSuccessful( Caster );
|
||||
|
|
@ -83,14 +109,64 @@ namespace Server.Spells.Bushido
|
|||
return m_Table.Contains( m );
|
||||
}
|
||||
|
||||
public static TimeSpan GetEvadeDuration( Mobile m )
|
||||
{
|
||||
|
||||
/* Evasion duration now scales with Bushido skill
|
||||
*
|
||||
* If the player has higher than GM Bushido, and GM Tactics and Anatomy, they get a 1 second bonus
|
||||
* Evasion duration range:
|
||||
* o 3-6 seconds w/o tactics/anatomy
|
||||
* o 6-7 seconds w/ GM+ Bushido and GM tactics/anatomy
|
||||
*/
|
||||
|
||||
if( !Core.ML )
|
||||
return TimeSpan.FromSeconds( 8.0 );
|
||||
|
||||
double seconds = 3;
|
||||
|
||||
if( m.Skills.Bushido.Value > 60 )
|
||||
seconds += m.Skills.Bushido.Value / 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
|
||||
seconds++;
|
||||
|
||||
return TimeSpan.FromSeconds( (int)seconds );
|
||||
}
|
||||
|
||||
public static double GetParryScalar( Mobile m )
|
||||
{
|
||||
/* Evasion modifier to parry now scales with Bushido skill
|
||||
*
|
||||
* If the player has higher than GM Bushido, and at least GM Tactics and Anatomy, they get a bonus to their evasion modifier (10% bonus to the evasion modifier to parry NOT 10% to the final parry chance)
|
||||
*
|
||||
* Bonus modifier to parry range: (these are the ranges for the evasion modifier)
|
||||
* o 16-40% bonus w/o tactics/anatomy
|
||||
* o 42-50% bonus w/ GM+ bushido and GM tactics/anatomy
|
||||
*/
|
||||
|
||||
if( !Core.ML )
|
||||
return 1.5;
|
||||
|
||||
double bonus = 80;
|
||||
|
||||
if( m.Skills.Bushido.Value > 60 )
|
||||
bonus += m.Skills.Bushido.Value;
|
||||
|
||||
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 += 50;
|
||||
|
||||
return 1.0 + bonus/500;
|
||||
}
|
||||
|
||||
public static void BeginEvasion( Mobile m )
|
||||
{
|
||||
Timer t = (Timer)m_Table[m];
|
||||
|
||||
if ( t != null )
|
||||
if( t != null )
|
||||
t.Stop();
|
||||
|
||||
t = new InternalTimer( m );
|
||||
t = new InternalTimer( m, GetEvadeDuration( m ) );
|
||||
|
||||
m_Table[m] = t;
|
||||
|
||||
|
|
@ -101,7 +177,7 @@ namespace Server.Spells.Bushido
|
|||
{
|
||||
Timer t = (Timer)m_Table[m];
|
||||
|
||||
if ( t != null )
|
||||
if( t != null )
|
||||
t.Stop();
|
||||
|
||||
m_Table.Remove( m );
|
||||
|
|
@ -113,7 +189,8 @@ namespace Server.Spells.Bushido
|
|||
{
|
||||
private Mobile m_Mobile;
|
||||
|
||||
public InternalTimer( Mobile m ) : base( TimeSpan.FromSeconds( 8.0 ) )
|
||||
public InternalTimer( Mobile m, TimeSpan delay )
|
||||
: base( delay )
|
||||
{
|
||||
m_Mobile = m;
|
||||
Priority = TimerPriority.TwoFiftyMS;
|
||||
|
|
@ -126,4 +203,4 @@ namespace Server.Spells.Bushido
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -53,6 +53,9 @@ namespace Server.Spells.Bushido
|
|||
attacker.SendLocalizedMessage( 1063168 ); // You attack with lightning precision!
|
||||
defender.SendLocalizedMessage( 1063169 ); // Your opponent's quick strike causes extra damage!
|
||||
|
||||
defender.FixedParticles( 0x3818, 1, 11, 0x13A8, 0, 0, EffectLayer.Waist );
|
||||
defender.PlaySound( 0x51D );
|
||||
|
||||
CheckGain( attacker );
|
||||
|
||||
SetContext( attacker );
|
||||
|
|
@ -65,4 +68,4 @@ namespace Server.Spells.Bushido
|
|||
SetContext( attacker );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -57,6 +57,8 @@ namespace Server.Spells.Bushido
|
|||
|
||||
target.FixedParticles( 0x37B9, 1, 4, 0x251D, 0, 0, EffectLayer.Waist );
|
||||
|
||||
attacker.PlaySound( 0x510 );
|
||||
|
||||
weapon.OnSwing( attacker, target, damageBonus );
|
||||
|
||||
CheckGain( attacker );
|
||||
|
|
@ -72,4 +74,4 @@ namespace Server.Spells.Bushido
|
|||
m.CheckSkill( MoveSkill, RequiredSkill, 120.0 );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue