Fixes casting checks
This commit is contained in:
parent
7ea00fbf4f
commit
03dd5f1926
431 changed files with 5616 additions and 6250 deletions
|
|
@ -191,7 +191,7 @@ namespace Server.Spells.Ninjitsu
|
|||
}
|
||||
|
||||
/*
|
||||
if( !m.CheckSkill( SkillName.Ninjitsu, entry.ReqSkill, entry.ReqSkill + 37.5 ) )
|
||||
if ( !m.CheckSkill( SkillName.Ninjitsu, entry.ReqSkill, entry.ReqSkill + 37.5 ) )
|
||||
return MorphResult.Fail;
|
||||
*
|
||||
* On OSI,it seems you can only gain starting at '0' using Animal form.
|
||||
|
|
@ -472,7 +472,7 @@ namespace Server.Spells.Ninjitsu
|
|||
{
|
||||
m_Caster.SendLocalizedMessage(1060174, mana.ToString()); // You must have at least ~1_MANA_REQUIREMENT~ Mana to use this ability.
|
||||
}
|
||||
else if( ( m_Caster is PlayerMobile ) && ( m_Caster as PlayerMobile ).MountBlockReason != BlockMountType.None )
|
||||
else if ( ( m_Caster is PlayerMobile ) && ( m_Caster as PlayerMobile ).MountBlockReason != BlockMountType.None )
|
||||
{
|
||||
m_Caster.SendLocalizedMessage( 1063108 ); // You cannot use this ability right now.
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ namespace Server.Spells.Ninjitsu
|
|||
|
||||
public override bool Validate( Mobile from )
|
||||
{
|
||||
if( !from.Hidden || from.AllowedStealthSteps <= 0 )
|
||||
if ( !from.Hidden || from.AllowedStealthSteps <= 0 )
|
||||
{
|
||||
from.SendLocalizedMessage( 1063087 ); // You must be in stealth mode to use this ability.
|
||||
return false;
|
||||
|
|
@ -41,7 +41,7 @@ namespace Server.Spells.Ninjitsu
|
|||
{
|
||||
bool valid = Validate( attacker ) && CheckMana( attacker, true );
|
||||
|
||||
if( valid )
|
||||
if ( valid )
|
||||
{
|
||||
attacker.BeginAction( typeof( Stealth ) );
|
||||
Timer.DelayCall( TimeSpan.FromSeconds( 5.0 ), delegate { attacker.EndAction( typeof( Stealth ) ); } );
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ namespace Server.Spells.Ninjitsu
|
|||
|
||||
public override void OnHit( Mobile attacker, Mobile defender, int damage )
|
||||
{
|
||||
if( !Validate( attacker ) || !CheckMana( attacker, true ) )
|
||||
if ( !Validate( attacker ) || !CheckMana( attacker, true ) )
|
||||
return;
|
||||
|
||||
ClearCurrentMove( attacker );
|
||||
|
|
@ -39,12 +39,12 @@ namespace Server.Spells.Ninjitsu
|
|||
if ( attacker.Weapon is BaseRanged )
|
||||
isRanged = true;
|
||||
|
||||
if( ninjitsu < 100 ) //This formula is an approximation from OSI data. TODO: find correct formula
|
||||
if ( ninjitsu < 100 ) //This formula is an approximation from OSI data. TODO: find correct formula
|
||||
chance = 30 + (ninjitsu - 85) * 2.2;
|
||||
else
|
||||
chance = 63 + (ninjitsu - 100) * 1.1;
|
||||
|
||||
if( (chance / 100) < Utility.RandomDouble() )
|
||||
if ( (chance / 100) < Utility.RandomDouble() )
|
||||
{
|
||||
attacker.SendLocalizedMessage( 1070779 ); // You missed your opponent with a Death Strike.
|
||||
return;
|
||||
|
|
@ -55,16 +55,16 @@ namespace Server.Spells.Ninjitsu
|
|||
|
||||
int damageBonus = 0;
|
||||
|
||||
if( m_Table.Contains( defender ) )
|
||||
if ( m_Table.Contains( defender ) )
|
||||
{
|
||||
defender.SendLocalizedMessage( 1063092 ); // Your opponent lands another Death Strike!
|
||||
|
||||
info = (DeathStrikeInfo)m_Table[defender];
|
||||
|
||||
if( info.m_Steps > 0 )
|
||||
if ( info.m_Steps > 0 )
|
||||
damageBonus = attacker.Skills[SkillName.Ninjitsu].Fixed / 150;
|
||||
|
||||
if( info.m_Timer != null )
|
||||
if ( info.m_Timer != null )
|
||||
info.m_Timer.Stop();
|
||||
|
||||
m_Table.Remove( defender );
|
||||
|
|
@ -112,10 +112,10 @@ namespace Server.Spells.Ninjitsu
|
|||
{
|
||||
DeathStrikeInfo info = m_Table[m] as DeathStrikeInfo;
|
||||
|
||||
if( info == null )
|
||||
if ( info == null )
|
||||
return;
|
||||
|
||||
if( ++info.m_Steps >= 5 )
|
||||
if ( ++info.m_Steps >= 5 )
|
||||
ProcessDeathStrike( m );
|
||||
}
|
||||
|
||||
|
|
@ -125,7 +125,7 @@ namespace Server.Spells.Ninjitsu
|
|||
|
||||
DeathStrikeInfo info = m_Table[defender] as DeathStrikeInfo;
|
||||
|
||||
if( info == null ) //sanity
|
||||
if ( info == null ) //sanity
|
||||
return;
|
||||
|
||||
int maxDamage, damage = 0;
|
||||
|
|
@ -163,7 +163,7 @@ namespace Server.Spells.Ninjitsu
|
|||
else
|
||||
AOS.Damage( info.m_Target, info.m_Attacker, damage, true, 100, 0, 0, 0, 0, 0, 0, false, false, true ); // Damage is physical.
|
||||
|
||||
if( info.m_Timer != null )
|
||||
if ( info.m_Timer != null )
|
||||
info.m_Timer.Stop();
|
||||
|
||||
m_Table.Remove( info.m_Target );
|
||||
|
|
|
|||
|
|
@ -37,11 +37,11 @@ namespace Server.Spells.Ninjitsu
|
|||
return false;
|
||||
}
|
||||
|
||||
if( Core.ML )
|
||||
if ( Core.ML )
|
||||
{
|
||||
BaseRanged ranged = from.Weapon as BaseRanged;
|
||||
|
||||
if( ranged != null )
|
||||
if ( ranged != null )
|
||||
{
|
||||
from.SendLocalizedMessage( 1075858 ); // You can only use this with melee attacks.
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ namespace Server.Spells.Ninjitsu
|
|||
Caster.SendLocalizedMessage( 1063133 ); // You cannot summon a mirror image because you have too many followers.
|
||||
return false;
|
||||
}
|
||||
else if( TransformationSpellHelper.UnderTransformation( Caster, typeof( HorrificBeastSpell ) ) )
|
||||
else if ( TransformationSpellHelper.UnderTransformation( Caster, typeof( HorrificBeastSpell ) ) )
|
||||
{
|
||||
Caster.SendLocalizedMessage( 1061091 ); // You cannot cast that spell in this form.
|
||||
return false;
|
||||
|
|
@ -103,7 +103,7 @@ namespace Server.Spells.Ninjitsu
|
|||
{
|
||||
Caster.SendLocalizedMessage( 1063133 ); // You cannot summon a mirror image because you have too many followers.
|
||||
}
|
||||
else if( TransformationSpellHelper.UnderTransformation( Caster, typeof( HorrificBeastSpell ) ) )
|
||||
else if ( TransformationSpellHelper.UnderTransformation( Caster, typeof( HorrificBeastSpell ) ) )
|
||||
{
|
||||
Caster.SendLocalizedMessage( 1061091 ); // You cannot cast that spell in this form.
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ namespace Server.Spells.Ninjitsu
|
|||
|
||||
public override bool Validate( Mobile from )
|
||||
{
|
||||
if( !from.Hidden || from.AllowedStealthSteps <= 0 )
|
||||
if ( !from.Hidden || from.AllowedStealthSteps <= 0 )
|
||||
{
|
||||
from.SendLocalizedMessage( 1063087 ); // You must be in stealth mode to use this ability.
|
||||
return false;
|
||||
|
|
@ -34,7 +34,7 @@ namespace Server.Spells.Ninjitsu
|
|||
{
|
||||
bool valid = Validate( attacker ) && CheckMana( attacker, true );
|
||||
|
||||
if( valid )
|
||||
if ( valid )
|
||||
{
|
||||
attacker.BeginAction( typeof( Stealth ) );
|
||||
Timer.DelayCall( TimeSpan.FromSeconds( 5.0 ), delegate { attacker.EndAction( typeof( Stealth ) ); } );
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue