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,106 +2,106 @@ using Server.Items;
namespace Server.Mobiles
{
public class Protector : BaseCreature
{
public override string CorpseName => "a human corpse";
public override string DefaultName => "a Protector";
public class Protector : BaseCreature
{
[Constructible]
public Protector()
: base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
{
Body = 401;
Female = true;
Hue = Race.Human.RandomSkinHue();
HairItemID = Race.Human.RandomHair(this);
HairHue = Race.Human.RandomHairHue();
[Constructible]
public Protector()
: base( AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4 )
{
Body = 401;
Female = true;
Hue = Race.Human.RandomSkinHue();
HairItemID = Race.Human.RandomHair( this );
HairHue = Race.Human.RandomHairHue();
Title = "the mystic llamaherder";
Title = "the mystic llamaherder";
SetStr(700, 800);
SetDex(100, 150);
SetInt(50, 75);
SetStr( 700, 800 );
SetDex( 100, 150 );
SetInt( 50, 75 );
SetHits(350, 450);
SetHits( 350, 450 );
SetDamage(6, 12);
SetDamage( 6, 12 );
SetDamageType(ResistanceType.Physical, 100);
SetDamageType( ResistanceType.Physical, 100 );
SetResistance(ResistanceType.Physical, 30, 40);
SetResistance(ResistanceType.Fire, 20, 30);
SetResistance(ResistanceType.Cold, 35, 40);
SetResistance(ResistanceType.Poison, 30, 40);
SetResistance(ResistanceType.Energy, 30, 40);
SetResistance( ResistanceType.Physical, 30, 40 );
SetResistance( ResistanceType.Fire, 20, 30 );
SetResistance( ResistanceType.Cold, 35, 40 );
SetResistance( ResistanceType.Poison, 30, 40 );
SetResistance( ResistanceType.Energy, 30, 40 );
SetSkill(SkillName.Wrestling, 70.0, 100.0);
SetSkill(SkillName.Tactics, 80.0, 100.0);
SetSkill(SkillName.MagicResist, 50.0, 70.0);
SetSkill(SkillName.Anatomy, 70.0, 100.0);
SetSkill( SkillName.Wrestling, 70.0, 100.0 );
SetSkill( SkillName.Tactics, 80.0, 100.0 );
SetSkill( SkillName.MagicResist, 50.0, 70.0 );
SetSkill( SkillName.Anatomy, 70.0, 100.0 );
Fame = 10000;
Karma = -10000;
Fame = 10000;
Karma = -10000;
Item boots = new ThighBoots();
boots.Movable = false;
boots.Hue = Utility.Random(2);
Item boots = new ThighBoots();
boots.Movable = false;
boots.Hue = Utility.Random( 2 );
Item shroud = new Item(0x204E);
shroud.Layer = Layer.OuterTorso;
shroud.Movable = false;
shroud.Hue = Utility.Random(2);
Item shroud = new Item( 0x204E );
shroud.Layer = Layer.OuterTorso;
shroud.Movable = false;
shroud.Hue = Utility.Random( 2 );
AddItem(boots);
AddItem(shroud);
}
AddItem( boots );
AddItem( shroud );
}
public Protector(Serial serial)
: base(serial)
{
}
public override bool AlwaysMurderer => true;
public override bool PropertyTitle => false;
public override bool ShowFameTitle => false;
public override string CorpseName => "a human corpse";
public override string DefaultName => "a Protector";
public Protector( Serial serial )
: base( serial )
{
}
public override bool AlwaysMurderer => true;
public override bool PropertyTitle => false;
public override bool ShowFameTitle => false;
public override void GenerateLoot( bool spawning )
{
if ( spawning )
return; // No loot/backpack on spawn
public override void GenerateLoot(bool spawning)
{
if (spawning)
return; // No loot/backpack on spawn
base.GenerateLoot( true );
base.GenerateLoot( false );
}
base.GenerateLoot(true);
base.GenerateLoot(false);
}
public override void GenerateLoot()
{
AddLoot( LootPack.FilthyRich );
}
public override void GenerateLoot()
{
AddLoot(LootPack.FilthyRich);
}
/*
// TODO: uncomment once added
public override void OnDeath( Container c )
{
base.OnDeath( c );
/*
// TODO: uncomment once added
public override void OnDeath( Container c )
{
base.OnDeath( c );
if ( Utility.RandomDouble() < 0.4 )
c.DropItem( new ProtectorsEssence() );
}
*/
if ( Utility.RandomDouble() < 0.4 )
c.DropItem( new ProtectorsEssence() );
}
*/
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write( (int) 0 ); // version
}
writer.Write(0); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}
int version = reader.ReadInt();
}
}
}