Fixes code according to modern code style. Fixes a few expression bugs.

This commit is contained in:
Kamron Batman 2018-09-15 09:58:51 -07:00
parent 89eea25e5f
commit 970fd563b2
3324 changed files with 441118 additions and 433755 deletions

View file

@ -2,117 +2,117 @@ using System.Collections;
namespace Server.Mobiles
{
public class Succubus : BaseCreature
{
public override string CorpseName => "a succubus corpse";
public override string DefaultName => "a succubus";
public class Succubus : BaseCreature
{
[Constructible]
public Succubus() : base(AIType.AI_Mage, FightMode.Closest, 10, 1, 0.2, 0.4)
{
Body = 149;
BaseSoundID = 0x4B0;
[Constructible]
public Succubus () : base( AIType.AI_Mage, FightMode.Closest, 10, 1, 0.2, 0.4 )
{
Body = 149;
BaseSoundID = 0x4B0;
SetStr(488, 620);
SetDex(121, 170);
SetInt(498, 657);
SetStr( 488, 620 );
SetDex( 121, 170 );
SetInt( 498, 657 );
SetHits(312, 353);
SetHits( 312, 353 );
SetDamage(18, 28);
SetDamage( 18, 28 );
SetDamageType(ResistanceType.Physical, 75);
SetDamageType(ResistanceType.Energy, 25);
SetDamageType( ResistanceType.Physical, 75 );
SetDamageType( ResistanceType.Energy, 25 );
SetResistance(ResistanceType.Physical, 80, 90);
SetResistance(ResistanceType.Fire, 70, 80);
SetResistance(ResistanceType.Cold, 40, 50);
SetResistance(ResistanceType.Poison, 50, 60);
SetResistance(ResistanceType.Energy, 50, 60);
SetResistance( ResistanceType.Physical, 80, 90 );
SetResistance( ResistanceType.Fire, 70, 80 );
SetResistance( ResistanceType.Cold, 40, 50 );
SetResistance( ResistanceType.Poison, 50, 60 );
SetResistance( ResistanceType.Energy, 50, 60 );
SetSkill(SkillName.EvalInt, 90.1, 100.0);
SetSkill(SkillName.Magery, 99.1, 100.0);
SetSkill(SkillName.Meditation, 90.1, 100.0);
SetSkill(SkillName.MagicResist, 100.5, 150.0);
SetSkill(SkillName.Tactics, 80.1, 90.0);
SetSkill(SkillName.Wrestling, 80.1, 90.0);
SetSkill( SkillName.EvalInt, 90.1, 100.0 );
SetSkill( SkillName.Magery, 99.1, 100.0 );
SetSkill( SkillName.Meditation, 90.1, 100.0 );
SetSkill( SkillName.MagicResist, 100.5, 150.0 );
SetSkill( SkillName.Tactics, 80.1, 90.0 );
SetSkill( SkillName.Wrestling, 80.1, 90.0 );
Fame = 24000;
Karma = -24000;
Fame = 24000;
Karma = -24000;
VirtualArmor = 80;
}
VirtualArmor = 80;
}
public Succubus(Serial serial) : base(serial)
{
}
public override void GenerateLoot()
{
AddLoot( LootPack.FilthyRich, 2 );
AddLoot( LootPack.MedScrolls, 2 );
}
public override string CorpseName => "a succubus corpse";
public override string DefaultName => "a succubus";
public override int Meat => 1;
public override int TreasureMapLevel => 5;
public override int Meat => 1;
public override int TreasureMapLevel => 5;
public void DrainLife()
{
ArrayList list = new ArrayList();
public override void GenerateLoot()
{
AddLoot(LootPack.FilthyRich, 2);
AddLoot(LootPack.MedScrolls, 2);
}
foreach ( Mobile m in GetMobilesInRange( 2 ) )
{
if ( m == this || !CanBeHarmful( m ) )
continue;
public void DrainLife()
{
ArrayList list = new ArrayList();
if ( m is BaseCreature creature && (creature.Controlled || creature.Summoned || creature.Team != Team) )
list.Add( m );
else if ( m.Player )
list.Add( m );
}
foreach (Mobile m in GetMobilesInRange(2))
{
if (m == this || !CanBeHarmful(m))
continue;
foreach ( Mobile m in list )
{
DoHarmful( m );
if (m is BaseCreature creature && (creature.Controlled || creature.Summoned || creature.Team != Team))
list.Add(m);
else if (m.Player)
list.Add(m);
}
m.FixedParticles( 0x374A, 10, 15, 5013, 0x496, 0, EffectLayer.Waist );
m.PlaySound( 0x231 );
foreach (Mobile m in list)
{
DoHarmful(m);
//m.SendMessage( "You feel the life drain out of you!" );
m.FixedParticles(0x374A, 10, 15, 5013, 0x496, 0, EffectLayer.Waist);
m.PlaySound(0x231);
int toDrain = Utility.RandomMinMax( 10, 40 );
//m.SendMessage( "You feel the life drain out of you!" );
Hits += toDrain;
m.Damage( toDrain, this );
}
}
int toDrain = Utility.RandomMinMax(10, 40);
public override void OnGaveMeleeAttack( Mobile defender )
{
base.OnGaveMeleeAttack( defender );
Hits += toDrain;
m.Damage(toDrain, this);
}
}
if ( 0.1 >= Utility.RandomDouble() )
DrainLife();
}
public override void OnGaveMeleeAttack(Mobile defender)
{
base.OnGaveMeleeAttack(defender);
public override void OnGotMeleeAttack( Mobile attacker )
{
base.OnGotMeleeAttack( attacker );
if (0.1 >= Utility.RandomDouble())
DrainLife();
}
if ( 0.1 >= Utility.RandomDouble() )
DrainLife();
}
public override void OnGotMeleeAttack(Mobile attacker)
{
base.OnGotMeleeAttack(attacker);
public Succubus( Serial serial ) : base( serial )
{
}
if (0.1 >= Utility.RandomDouble())
DrainLife();
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 );
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0);
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}