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,103 +2,98 @@ using Server.Items;
namespace Server.Mobiles
{
public class GargoyleDestroyer : BaseCreature
{
public override string CorpseName => "a gargoyle corpse";
public override string DefaultName => "a gargoyle destroyer";
public class GargoyleDestroyer : BaseCreature
{
[Constructible]
public GargoyleDestroyer() : base(AIType.AI_Mage, FightMode.Closest, 10, 1, 0.2, 0.4)
{
Body = 0x2F3;
BaseSoundID = 0x174;
[Constructible]
public GargoyleDestroyer() : base( AIType.AI_Mage, FightMode.Closest, 10, 1, 0.2, 0.4 )
{
Body = 0x2F3;
BaseSoundID = 0x174;
SetStr(760, 850);
SetDex(102, 150);
SetInt(152, 200);
SetStr( 760, 850 );
SetDex( 102, 150 );
SetInt( 152, 200 );
SetHits(482, 485);
SetHits( 482, 485 );
SetDamage(7, 14);
SetDamage( 7, 14 );
SetResistance(ResistanceType.Physical, 40, 60);
SetResistance(ResistanceType.Fire, 60, 70);
SetResistance(ResistanceType.Cold, 15, 25);
SetResistance(ResistanceType.Poison, 15, 25);
SetResistance(ResistanceType.Energy, 15, 25);
SetResistance( ResistanceType.Physical, 40, 60 );
SetResistance( ResistanceType.Fire, 60, 70 );
SetResistance( ResistanceType.Cold, 15, 25 );
SetResistance( ResistanceType.Poison, 15, 25 );
SetResistance( ResistanceType.Energy, 15, 25 );
SetSkill(SkillName.Wrestling, 90.1, 100.0);
SetSkill(SkillName.Tactics, 90.1, 100.0);
SetSkill(SkillName.MagicResist, 120.4, 160.0);
SetSkill(SkillName.Anatomy, 50.5, 100.0);
SetSkill(SkillName.Swords, 90.1, 100.0);
SetSkill(SkillName.Macing, 90.1, 100.0);
SetSkill(SkillName.Fencing, 90.1, 100.0);
SetSkill(SkillName.Magery, 90.1, 100.0);
SetSkill(SkillName.EvalInt, 90.1, 100.0);
SetSkill(SkillName.Meditation, 90.1, 100.0);
SetSkill( SkillName.Wrestling, 90.1, 100.0 );
SetSkill( SkillName.Tactics, 90.1, 100.0 );
SetSkill( SkillName.MagicResist, 120.4, 160.0 );
SetSkill( SkillName.Anatomy, 50.5, 100.0 );
SetSkill( SkillName.Swords, 90.1, 100.0 );
SetSkill( SkillName.Macing, 90.1, 100.0 );
SetSkill( SkillName.Fencing, 90.1, 100.0 );
SetSkill( SkillName.Magery, 90.1, 100.0 );
SetSkill( SkillName.EvalInt, 90.1, 100.0 );
SetSkill( SkillName.Meditation, 90.1, 100.0 );
Fame = 10000;
Karma = -10000;
Fame = 10000;
Karma = -10000;
VirtualArmor = 50;
VirtualArmor = 50;
if (0.2 > Utility.RandomDouble())
PackItem(new GargoylesPickaxe());
}
if ( 0.2 > Utility.RandomDouble() )
PackItem( new GargoylesPickaxe() );
}
public GargoyleDestroyer(Serial serial) : base(serial)
{
}
public override void GenerateLoot()
{
AddLoot( LootPack.FilthyRich );
AddLoot( LootPack.Rich );
AddLoot( LootPack.MedScrolls );
AddLoot( LootPack.Gems, 2 );
}
public override string CorpseName => "a gargoyle corpse";
public override string DefaultName => "a gargoyle destroyer";
public override bool BardImmune => !Core.AOS;
public override int Meat => 1;
public override bool CanFly => true;
public override bool BardImmune => !Core.AOS;
public override int Meat => 1;
public override bool CanFly => true;
public override void OnDamagedBySpell( Mobile from )
{
if ( from != null && from.Alive && 0.4 > Utility.RandomDouble() )
{
ThrowHatchet( from );
}
}
public override void GenerateLoot()
{
AddLoot(LootPack.FilthyRich);
AddLoot(LootPack.Rich);
AddLoot(LootPack.MedScrolls);
AddLoot(LootPack.Gems, 2);
}
public override void OnGotMeleeAttack( Mobile attacker )
{
base.OnGotMeleeAttack( attacker );
public override void OnDamagedBySpell(Mobile from)
{
if (from != null && from.Alive && 0.4 > Utility.RandomDouble()) ThrowHatchet(from);
}
if ( attacker != null && attacker.Alive && attacker.Weapon is BaseRanged && 0.4 > Utility.RandomDouble() )
{
ThrowHatchet( attacker );
}
}
public override void OnGotMeleeAttack(Mobile attacker)
{
base.OnGotMeleeAttack(attacker);
public void ThrowHatchet( Mobile to )
{
int damage = 50;
MovingEffect( to, 0xF43, 10, 0, false, false );
DoHarmful( to );
AOS.Damage( to, this, damage, 100, 0, 0, 0, 0 );
}
if (attacker != null && attacker.Alive && attacker.Weapon is BaseRanged && 0.4 > Utility.RandomDouble())
ThrowHatchet(attacker);
}
public GargoyleDestroyer( Serial serial ) : base( serial )
{
}
public void ThrowHatchet(Mobile to)
{
int damage = 50;
MovingEffect(to, 0xF43, 10, 0, false, false);
DoHarmful(to);
AOS.Damage(to, this, damage, 100, 0, 0, 0, 0);
}
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();
}
}
}