Adds style cop (#109)

This commit is contained in:
Kamron Batman 2020-04-26 00:16:02 -07:00 • committed by GitHub
parent 3e715bcb60
commit 556a17aba8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
1725 changed files with 33831 additions and 38046 deletions

View file

@ -9,7 +9,7 @@ namespace Server.Mobiles
{
public class Ilhenir : BaseChampion
{
private static HashSet<Mobile> m_Table = new HashSet<Mobile>();
private static readonly HashSet<Mobile> m_Table = new HashSet<Mobile>();
[Constructible]
public Ilhenir()
@ -92,7 +92,7 @@ namespace Server.Mobiles
public override Poison PoisonImmune => Poison.Lethal;
//public override bool GivesMLMinorArtifact => true; // TODO: Needs verification
// public override bool GivesMLMinorArtifact => true; // TODO: Needs verification
public override int TreasureMapLevel => 5;
public virtual void PackResources(int amount)
@ -149,7 +149,7 @@ namespace Server.Mobiles
c.DropItem(new GrizzledBones());
// TODO: Parrots
/*if ( Utility.RandomDouble() < 0.6 )
/*if (Utility.RandomDouble() < 0.6)
c.DropItem( new ParrotItem() ); */
if (Utility.RandomDouble() < 0.05)
@ -159,7 +159,7 @@ namespace Server.Mobiles
c.DropItem(new CrimsonCincture());
// TODO: Armor sets
/*if ( Utility.RandomDouble() < 0.05 )
/*if (Utility.RandomDouble() < 0.05)
{
switch ( Utility.Random(5) )
{
@ -303,7 +303,7 @@ namespace Server.Mobiles
}
[CommandProperty(AccessLevel.GameMaster)]
public bool Corrosive{ get; set; }
public bool Corrosive { get; set; }
public override void OnAfterDelete()
{

View file

@ -31,10 +31,10 @@ namespace Server.Mobiles
SetResistance(ResistanceType.Poison, 40, 60);
SetResistance(ResistanceType.Energy, 50, 55);
//SetSkill( SkillName.Meditation, Unknown );
//SetSkill( SkillName.EvalInt, Unknown );
//SetSkill( SkillName.Magery, Unknown );
//SetSkill( SkillName.Poisoning, Unknown );
// SetSkill( SkillName.Meditation, Unknown );
// SetSkill( SkillName.EvalInt, Unknown );
// SetSkill( SkillName.Magery, Unknown );
// SetSkill( SkillName.Poisoning, Unknown );
SetSkill(SkillName.Anatomy, 0);
SetSkill(SkillName.MagicResist, 107.0, 111.3);
SetSkill(SkillName.Tactics, 107.0, 117.0);
@ -169,7 +169,7 @@ namespace Server.Mobiles
{
base.OnGaveMeleeAttack(defender);
if (0.2 >= Utility.RandomDouble())
if (Utility.RandomDouble() <= 0.2)
Earthquake();
}
@ -179,8 +179,8 @@ namespace Server.Mobiles
foreach (Mobile m in eable)
{
if (m == this || !CanBeHarmful(m) || m.Deleted || !m.Player &&
!(m is BaseCreature creature && (creature.Controlled || creature.Summoned || creature.Team != Team)))
if (m == this || !CanBeHarmful(m) || m.Deleted || (!m.Player &&
!(m is BaseCreature creature && (creature.Controlled || creature.Summoned || creature.Team != Team))))
continue;
if (m is PlayerMobile pm && pm.Mounted)
@ -212,8 +212,6 @@ namespace Server.Mobiles
int version = reader.ReadInt();
}
#region SpawnHelpers
public void SpawnTormented()
{
BaseCreature spawna = new TormentedMinotaur();
@ -228,7 +226,5 @@ namespace Server.Mobiles
BaseCreature spawnd = new TormentedMinotaur();
spawnd.MoveToWorld(Location, Map);
}
#endregion
}
}

View file

@ -101,7 +101,7 @@ namespace Server.Mobiles
public override void AlterDamageScalarFrom(Mobile caster, ref double scalar)
{
if (0.1 >= Utility.RandomDouble())
if (Utility.RandomDouble() <= 0.1)
SpawnPixies(caster);
}
@ -118,7 +118,7 @@ namespace Server.Mobiles
{
base.OnGotMeleeAttack(attacker);
if (0.1 >= Utility.RandomDouble())
if (Utility.RandomDouble() <= 0.1)
SpawnPixies(attacker);
}