Fixes casting checks
This commit is contained in:
parent
7ea00fbf4f
commit
03dd5f1926
431 changed files with 5616 additions and 6250 deletions
|
|
@ -111,7 +111,7 @@ namespace Server.Mobiles
|
|||
if ( combatant == null || combatant.Deleted || combatant.Map != Map || !InRange( combatant, 12 ) || !CanBeHarmful( combatant ) || !InLOS( combatant ) )
|
||||
return;
|
||||
|
||||
if( Utility.Random( 10 ) == 0 )
|
||||
if ( Utility.Random( 10 ) == 0 )
|
||||
PoisonAttack( combatant );
|
||||
|
||||
base.OnDamage( amount, from, willKill );
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ namespace Server.Mobiles
|
|||
Karma = -700;
|
||||
|
||||
|
||||
if( Utility.RandomBool() )
|
||||
if ( Utility.RandomBool() )
|
||||
{
|
||||
Item i = Loot.RandomReagent();
|
||||
i.Amount = 3;
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ namespace Server.Mobiles
|
|||
AddItem( new LeatherNinjaPants());
|
||||
AddItem( new LeatherNinjaMitts());
|
||||
|
||||
if( Utility.RandomDouble() < 0.33 )
|
||||
if ( Utility.RandomDouble() < 0.33 )
|
||||
AddItem( new SmokeBomb() );
|
||||
|
||||
switch ( Utility.Random( 8 ))
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@ namespace Server.Mobiles
|
|||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
if( version == 0 )
|
||||
if ( version == 0 )
|
||||
Hue = 0x489;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ namespace Server.Mobiles
|
|||
{
|
||||
base.OnGaveMeleeAttack( defender );
|
||||
|
||||
if( 0.1 > Utility.RandomDouble() )
|
||||
if ( 0.1 > Utility.RandomDouble() )
|
||||
{
|
||||
/* Flurry of Twigs
|
||||
* Start cliloc: 1070850
|
||||
|
|
@ -69,7 +69,7 @@ namespace Server.Mobiles
|
|||
|
||||
ExpireTimer timer = (ExpireTimer)m_FlurryOfTwigsTable[defender];
|
||||
|
||||
if( timer != null )
|
||||
if ( timer != null )
|
||||
{
|
||||
timer.DoExpire();
|
||||
defender.SendLocalizedMessage( 1070851 ); // The creature lands another blow in your weakened state.
|
||||
|
|
@ -88,7 +88,7 @@ namespace Server.Mobiles
|
|||
timer.Start();
|
||||
m_FlurryOfTwigsTable[defender] = timer;
|
||||
}
|
||||
else if( 0.05 > Utility.RandomDouble() )
|
||||
else if ( 0.05 > Utility.RandomDouble() )
|
||||
{
|
||||
/* Chlorophyl Blast
|
||||
* Start cliloc: 1070827
|
||||
|
|
@ -99,7 +99,7 @@ namespace Server.Mobiles
|
|||
|
||||
ExpireTimer timer = (ExpireTimer)m_ChlorophylBlastTable[defender];
|
||||
|
||||
if( timer != null )
|
||||
if ( timer != null )
|
||||
{
|
||||
timer.DoExpire();
|
||||
defender.SendLocalizedMessage( 1070828 ); // The creature continues to hinder your energy resistance!
|
||||
|
|
@ -147,7 +147,7 @@ namespace Server.Mobiles
|
|||
|
||||
protected override void OnTick()
|
||||
{
|
||||
if( m_Mod.Type == ResistanceType.Physical )
|
||||
if ( m_Mod.Type == ResistanceType.Physical )
|
||||
m_Mobile.SendLocalizedMessage( 1070852 ); // Your resistance to physical attacks has returned.
|
||||
else
|
||||
m_Mobile.SendLocalizedMessage( 1070829 ); // Your resistance to energy attacks has returned.
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ namespace Server.Mobiles
|
|||
{
|
||||
base.OnGaveMeleeAttack( defender );
|
||||
|
||||
if( 0.1 > Utility.RandomDouble() )
|
||||
if ( 0.1 > Utility.RandomDouble() )
|
||||
{
|
||||
/* Cold Wind
|
||||
* Graphics: Message - Type: "3" From: "0x57D4F5B" To: "0x0" ItemId: "0x37B9" ItemIdName: "glow" FromLocation: "(928 164, 34)" ToLocation: "(928 164, 34)" Speed: "10" Duration: "5" FixedDirection: "True" Explode: "False"
|
||||
|
|
@ -85,7 +85,7 @@ namespace Server.Mobiles
|
|||
|
||||
ExpireTimer timer = (ExpireTimer)m_Table[defender];
|
||||
|
||||
if( timer != null )
|
||||
if ( timer != null )
|
||||
{
|
||||
timer.DoExpire();
|
||||
defender.SendLocalizedMessage( 1070831 ); // The freezing wind continues to blow!
|
||||
|
|
@ -123,7 +123,7 @@ namespace Server.Mobiles
|
|||
|
||||
public void DrainLife()
|
||||
{
|
||||
if( m_Mobile.Alive )
|
||||
if ( m_Mobile.Alive )
|
||||
m_Mobile.Damage( 2, m_From );
|
||||
else
|
||||
DoExpire();
|
||||
|
|
@ -133,7 +133,7 @@ namespace Server.Mobiles
|
|||
{
|
||||
DrainLife();
|
||||
|
||||
if( ++m_Count >= 5 )
|
||||
if ( ++m_Count >= 5 )
|
||||
{
|
||||
DoExpire();
|
||||
m_Mobile.SendLocalizedMessage( 1070830 ); // The icy wind dissipates.
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ namespace Server.Mobiles
|
|||
|
||||
|
||||
|
||||
if( Utility.RandomDouble() > .2 )
|
||||
if ( Utility.RandomDouble() > .2 )
|
||||
AddItem( new NoDachi() );
|
||||
else
|
||||
AddItem( new Halberd() );
|
||||
|
|
|
|||
|
|
@ -220,7 +220,7 @@ namespace Server.Mobiles
|
|||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
|
||||
if( version < 1 )
|
||||
if ( version < 1 )
|
||||
{
|
||||
for ( int i = 0; i < Skills.Length; ++i )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ namespace Server.Mobiles
|
|||
{
|
||||
base.OnGaveMeleeAttack( defender );
|
||||
|
||||
if( 0.1 > Utility.RandomDouble() )
|
||||
if ( 0.1 > Utility.RandomDouble() )
|
||||
{
|
||||
/* Blood Bath
|
||||
* Start cliloc 1070826
|
||||
|
|
@ -87,7 +87,7 @@ namespace Server.Mobiles
|
|||
|
||||
ExpireTimer timer = (ExpireTimer)m_Table[defender];
|
||||
|
||||
if( timer != null )
|
||||
if ( timer != null )
|
||||
{
|
||||
timer.DoExpire();
|
||||
defender.SendLocalizedMessage( 1070825 ); // The creature continues to rage!
|
||||
|
|
@ -125,7 +125,7 @@ namespace Server.Mobiles
|
|||
|
||||
public void DrainLife()
|
||||
{
|
||||
if( m_Mobile.Alive )
|
||||
if ( m_Mobile.Alive )
|
||||
m_Mobile.Damage( 2, m_From );
|
||||
else
|
||||
DoExpire();
|
||||
|
|
@ -135,7 +135,7 @@ namespace Server.Mobiles
|
|||
{
|
||||
DrainLife();
|
||||
|
||||
if( ++m_Count >= 5 )
|
||||
if ( ++m_Count >= 5 )
|
||||
{
|
||||
DoExpire();
|
||||
m_Mobile.SendLocalizedMessage( 1070824 ); // The creature's rage subsides.
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ namespace Server.Mobiles
|
|||
|
||||
private void DoCounter( Mobile attacker )
|
||||
{
|
||||
if( this.Map == null )
|
||||
if ( this.Map == null )
|
||||
return;
|
||||
|
||||
if ( attacker is BaseCreature && ((BaseCreature)attacker).BardProvoked )
|
||||
|
|
@ -99,7 +99,7 @@ namespace Server.Mobiles
|
|||
{
|
||||
Mobile m = ((BaseCreature)attacker).GetMaster();
|
||||
|
||||
if( m != null )
|
||||
if ( m != null )
|
||||
target = m;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ namespace Server.Mobiles
|
|||
PackItem( new GreenGourd() );
|
||||
PackItem( new ExecutionersAxe() );
|
||||
|
||||
if( Utility.RandomBool() )
|
||||
if ( Utility.RandomBool() )
|
||||
PackItem( new LongPants() );
|
||||
else
|
||||
PackItem( new ShortPants() );
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue