Adds style cop (#109)
This commit is contained in:
parent
3e715bcb60
commit
556a17aba8
1725 changed files with 33831 additions and 38046 deletions
|
|
@ -7,7 +7,7 @@ namespace Server.Mobiles
|
|||
{
|
||||
public class BakeKitsune : BaseCreature
|
||||
{
|
||||
private static Dictionary<Mobile, ExpireTimer> m_Table = new Dictionary<Mobile, ExpireTimer>();
|
||||
private static readonly Dictionary<Mobile, ExpireTimer> m_Table = new Dictionary<Mobile, ExpireTimer>();
|
||||
|
||||
[Constructible]
|
||||
public BakeKitsune() : base(AIType.AI_Mage, FightMode.Closest, 10, 1, 0.2, 0.4)
|
||||
|
|
@ -44,7 +44,6 @@ namespace Server.Mobiles
|
|||
ControlSlots = 2;
|
||||
MinTameSkill = 80.7;
|
||||
|
||||
|
||||
if (Utility.RandomDouble() < .25)
|
||||
PackItem(Seed.RandomBonsaiSeed());
|
||||
}
|
||||
|
|
@ -88,7 +87,7 @@ namespace Server.Mobiles
|
|||
{
|
||||
base.OnGaveMeleeAttack(defender);
|
||||
|
||||
if (0.1 <= Utility.RandomDouble())
|
||||
if (Utility.RandomDouble() >= 0.1)
|
||||
return;
|
||||
|
||||
/* Blood Bath
|
||||
|
|
@ -150,8 +149,8 @@ namespace Server.Mobiles
|
|||
private class ExpireTimer : Timer
|
||||
{
|
||||
private int m_Count;
|
||||
private Mobile m_From;
|
||||
private Mobile m_Mobile;
|
||||
private readonly Mobile m_From;
|
||||
private readonly Mobile m_Mobile;
|
||||
|
||||
public ExpireTimer(Mobile m, Mobile from) : base(TimeSpan.FromSeconds(1.0), TimeSpan.FromSeconds(1.0))
|
||||
{
|
||||
|
|
@ -186,8 +185,6 @@ namespace Server.Mobiles
|
|||
}
|
||||
}
|
||||
|
||||
#region Disguise
|
||||
|
||||
private Timer m_DisguiseTimer;
|
||||
|
||||
public void Disguise()
|
||||
|
|
@ -263,7 +260,5 @@ namespace Server.Mobiles
|
|||
{
|
||||
FindItemOnLayer(layer)?.Delete();
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,7 +36,6 @@ namespace Server.Mobiles
|
|||
Fame = 700;
|
||||
Karma = -700;
|
||||
|
||||
|
||||
if (Utility.RandomBool())
|
||||
{
|
||||
Item i = Loot.RandomReagent();
|
||||
|
|
|
|||
|
|
@ -41,7 +41,6 @@ namespace Server.Mobiles
|
|||
SetSkill(SkillName.Swords, 95.0, 120.0);
|
||||
SetSkill(SkillName.Ninjitsu, 95.0, 120.0);
|
||||
|
||||
|
||||
Fame = 8500;
|
||||
Karma = -8500;
|
||||
|
||||
|
|
@ -53,7 +52,6 @@ namespace Server.Mobiles
|
|||
Can change weapons during a fight
|
||||
*/
|
||||
|
||||
|
||||
AddItem(new NinjaTabi());
|
||||
AddItem(new LeatherNinjaJacket());
|
||||
AddItem(new LeatherNinjaHood());
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ namespace Server.Mobiles
|
|||
{
|
||||
public class FanDancer : BaseCreature
|
||||
{
|
||||
private static HashSet<Mobile> m_Table = new HashSet<Mobile>();
|
||||
private static readonly HashSet<Mobile> m_Table = new HashSet<Mobile>();
|
||||
|
||||
[Constructible]
|
||||
public FanDancer() : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
|
||||
|
|
@ -48,7 +48,7 @@ namespace Server.Mobiles
|
|||
|
||||
AddItem(new Tessen());
|
||||
|
||||
if (0.02 >= Utility.RandomDouble())
|
||||
if (Utility.RandomDouble() <= 0.02)
|
||||
PackItem(new OrigamiPaper());
|
||||
}
|
||||
|
||||
|
|
@ -61,7 +61,6 @@ namespace Server.Mobiles
|
|||
|
||||
public override bool Uncalmable => true;
|
||||
|
||||
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot(LootPack.FilthyRich);
|
||||
|
|
@ -79,7 +78,7 @@ namespace Server.Mobiles
|
|||
{
|
||||
base.OnDamagedBySpell(attacker);
|
||||
|
||||
if (0.8 > Utility.RandomDouble() && !attacker.InRange(this, 1))
|
||||
if (Utility.RandomDouble() < 0.8 && !attacker.InRange(this, 1))
|
||||
{
|
||||
/* Fan Throw
|
||||
* Effect: - To: "0x57D4F5B" - ItemId: "0x27A3" - ItemIdName: "Tessen" - FromLocation: "(992 299, 24)" - ToLocation: "(992 308, 22)" - Speed: "10" - Duration: "0" - FixedDirection: "False" - Explode: "False" - Hue: "0x0" - Render: "0x0"
|
||||
|
|
@ -96,7 +95,7 @@ namespace Server.Mobiles
|
|||
{
|
||||
base.OnGotMeleeAttack(attacker);
|
||||
|
||||
if (0.8 > Utility.RandomDouble() && !attacker.InRange(this, 1))
|
||||
if (Utility.RandomDouble() < 0.8 && !attacker.InRange(this, 1))
|
||||
{
|
||||
/* Fan Throw
|
||||
* Effect: - To: "0x57D4F5B" - ItemId: "0x27A3" - ItemIdName: "Tessen" - FromLocation: "(992 299, 24)" - ToLocation: "(992 308, 22)" - Speed: "10" - Duration: "0" - FixedDirection: "False" - Explode: "False" - Hue: "0x0" - Render: "0x0"
|
||||
|
|
@ -113,7 +112,7 @@ namespace Server.Mobiles
|
|||
{
|
||||
base.OnGaveMeleeAttack(defender);
|
||||
|
||||
if (!IsFanned(defender) && 0.05 > Utility.RandomDouble())
|
||||
if (!IsFanned(defender) && Utility.RandomDouble() < 0.05)
|
||||
{
|
||||
/* Fanning Fire
|
||||
* Graphic: Type: "3" From: "0x57D4F5B" To: "0x0" ItemId: "0x3709" ItemIdName: "fire column" FromLocation: "(994 325, 16)" ToLocation: "(994 325, 16)" Speed: "10" Duration: "30" FixedDirection: "True" Explode: "False" Hue: "0x0" RenderMode: "0x0" Effect: "0x34" ExplodeEffect: "0x1" ExplodeSound: "0x0" Serial: "0x57D4F5B" Layer: "5" Unknown: "0x0"
|
||||
|
|
@ -136,7 +135,7 @@ namespace Server.Mobiles
|
|||
defender.PlaySound(0x208);
|
||||
|
||||
// This should be done in place of the normal attack damage.
|
||||
//AOS.Damage( defender, this, Utility.RandomMinMax( 35, 45 ), 0, 100, 0, 0, 0 );
|
||||
// AOS.Damage( defender, this, Utility.RandomMinMax( 35, 45 ), 0, 100, 0, 0, 0 );
|
||||
|
||||
defender.AddResistanceMod(mod);
|
||||
|
||||
|
|
@ -164,8 +163,8 @@ namespace Server.Mobiles
|
|||
|
||||
private class ExpireTimer : Timer
|
||||
{
|
||||
private Mobile m_Mobile;
|
||||
private ResistanceMod m_Mod;
|
||||
private readonly Mobile m_Mobile;
|
||||
private readonly ResistanceMod m_Mod;
|
||||
|
||||
public ExpireTimer(Mobile m, ResistanceMod mod, TimeSpan delay) : base(delay)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -53,7 +53,6 @@ namespace Server.Mobiles
|
|||
public virtual double BoostedSpeed => 0.1;
|
||||
public override bool ReduceSpeedWithDamage => false;
|
||||
|
||||
|
||||
public override int Meat => 16;
|
||||
public override FoodType FavoriteFood => FoodType.Meat;
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ namespace Server.Mobiles
|
|||
{
|
||||
public class Kappa : BaseCreature
|
||||
{
|
||||
private static Dictionary<Mobile, InternalTimer> m_Table = new Dictionary<Mobile, InternalTimer>();
|
||||
private static readonly Dictionary<Mobile, InternalTimer> m_Table = new Dictionary<Mobile, InternalTimer>();
|
||||
|
||||
[Constructible]
|
||||
public Kappa() : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
|
||||
|
|
@ -170,8 +170,8 @@ namespace Server.Mobiles
|
|||
private class InternalTimer : Timer
|
||||
{
|
||||
private int m_Count;
|
||||
private Mobile m_From;
|
||||
private Mobile m_Mobile;
|
||||
private readonly Mobile m_From;
|
||||
private readonly Mobile m_Mobile;
|
||||
|
||||
public InternalTimer(Mobile from, Mobile m) : base(TimeSpan.FromSeconds(1.0), TimeSpan.FromSeconds(1.0))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@ namespace Server.Mobiles
|
|||
{
|
||||
public class KazeKemono : BaseCreature
|
||||
{
|
||||
private static Dictionary<Mobile, ExpireTimer> m_FlurryOfTwigsTable = new Dictionary<Mobile, ExpireTimer>();
|
||||
private static Dictionary<Mobile, ExpireTimer> m_ChlorophylBlastTable = new Dictionary<Mobile, ExpireTimer>();
|
||||
private static readonly Dictionary<Mobile, ExpireTimer> m_FlurryOfTwigsTable = new Dictionary<Mobile, ExpireTimer>();
|
||||
private static readonly Dictionary<Mobile, ExpireTimer> m_ChlorophylBlastTable = new Dictionary<Mobile, ExpireTimer>();
|
||||
|
||||
[Constructible]
|
||||
public KazeKemono()
|
||||
|
|
@ -54,7 +54,6 @@ namespace Server.Mobiles
|
|||
|
||||
public override bool BleedImmune => true;
|
||||
|
||||
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot(LootPack.Rich, 3);
|
||||
|
|
@ -64,7 +63,7 @@ namespace Server.Mobiles
|
|||
{
|
||||
base.OnGaveMeleeAttack(defender);
|
||||
|
||||
if (0.1 > Utility.RandomDouble())
|
||||
if (Utility.RandomDouble() < 0.1)
|
||||
{
|
||||
/* Flurry of Twigs
|
||||
* Start cliloc: 1070850
|
||||
|
|
@ -97,7 +96,7 @@ namespace Server.Mobiles
|
|||
return;
|
||||
}
|
||||
|
||||
if (0.05 > Utility.RandomDouble())
|
||||
if (Utility.RandomDouble() < 0.05)
|
||||
{
|
||||
/* Chlorophyl Blast
|
||||
* Start cliloc: 1070827
|
||||
|
|
@ -144,9 +143,9 @@ namespace Server.Mobiles
|
|||
|
||||
private class ExpireTimer : Timer
|
||||
{
|
||||
private Mobile m_Mobile;
|
||||
private ResistanceMod m_Mod;
|
||||
private Dictionary<Mobile, ExpireTimer> m_Table;
|
||||
private readonly Mobile m_Mobile;
|
||||
private readonly ResistanceMod m_Mod;
|
||||
private readonly Dictionary<Mobile, ExpireTimer> m_Table;
|
||||
|
||||
public ExpireTimer(Mobile m, ResistanceMod mod, Dictionary<Mobile, ExpireTimer> table, TimeSpan delay)
|
||||
: base(delay)
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ namespace Server.Mobiles
|
|||
{
|
||||
public class LadyOfTheSnow : BaseCreature
|
||||
{
|
||||
private static Dictionary<Mobile, ExpireTimer> m_Table = new Dictionary<Mobile, ExpireTimer>();
|
||||
private static readonly Dictionary<Mobile, ExpireTimer> m_Table = new Dictionary<Mobile, ExpireTimer>();
|
||||
|
||||
[Constructible]
|
||||
public LadyOfTheSnow()
|
||||
|
|
@ -43,11 +43,10 @@ namespace Server.Mobiles
|
|||
Fame = 15200;
|
||||
Karma = -15200;
|
||||
|
||||
|
||||
PackReg(3);
|
||||
PackItem(new Necklace());
|
||||
|
||||
if (0.25 > Utility.RandomDouble())
|
||||
if (Utility.RandomDouble() < 0.25)
|
||||
PackItem(Seed.RandomBonsaiSeed());
|
||||
}
|
||||
|
||||
|
|
@ -77,7 +76,7 @@ namespace Server.Mobiles
|
|||
{
|
||||
base.OnGaveMeleeAttack(defender);
|
||||
|
||||
if (0.1 <= Utility.RandomDouble())
|
||||
if (Utility.RandomDouble() >= 0.1)
|
||||
return;
|
||||
|
||||
/* Cold Wind
|
||||
|
|
@ -120,8 +119,8 @@ namespace Server.Mobiles
|
|||
private class ExpireTimer : Timer
|
||||
{
|
||||
private int m_Count;
|
||||
private Mobile m_From;
|
||||
private Mobile m_Mobile;
|
||||
private readonly Mobile m_From;
|
||||
private readonly Mobile m_Mobile;
|
||||
|
||||
public ExpireTimer(Mobile m, Mobile from)
|
||||
: base(TimeSpan.FromSeconds(1.0), TimeSpan.FromSeconds(1.0))
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ namespace Server.Mobiles
|
|||
{
|
||||
public class RaiJu : BaseCreature
|
||||
{
|
||||
private static HashSet<Mobile> m_Table = new HashSet<Mobile>();
|
||||
private static readonly HashSet<Mobile> m_Table = new HashSet<Mobile>();
|
||||
|
||||
[Constructible]
|
||||
public RaiJu() : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
|
||||
|
|
@ -60,7 +60,7 @@ namespace Server.Mobiles
|
|||
{
|
||||
base.OnGaveMeleeAttack(defender);
|
||||
|
||||
if (0.1 <= Utility.RandomDouble() || m_Table.Contains(defender))
|
||||
if (Utility.RandomDouble() >= 0.1 || m_Table.Contains(defender))
|
||||
return;
|
||||
|
||||
/* Lightning Fist
|
||||
|
|
@ -75,7 +75,7 @@ namespace Server.Mobiles
|
|||
defender.SendLocalizedMessage(1070839); // The creature attacks with stunning force!
|
||||
|
||||
// This should be done in place of the normal attack damage.
|
||||
//AOS.Damage( defender, this, Utility.RandomMinMax( 35, 65 ), 0, 0, 0, 0, 100 );
|
||||
// AOS.Damage( defender, this, Utility.RandomMinMax( 35, 65 ), 0, 0, 0, 0, 100 );
|
||||
|
||||
defender.Frozen = true;
|
||||
|
||||
|
|
@ -100,7 +100,7 @@ namespace Server.Mobiles
|
|||
|
||||
private class ExpireTimer : Timer
|
||||
{
|
||||
private Mobile m_Mobile;
|
||||
private readonly Mobile m_Mobile;
|
||||
|
||||
public ExpireTimer(Mobile m, TimeSpan delay) : base(delay)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -75,7 +75,6 @@ namespace Server.Mobiles
|
|||
break;
|
||||
}
|
||||
|
||||
|
||||
if (Utility.RandomDouble() > .2)
|
||||
AddItem(new NoDachi());
|
||||
else
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ namespace Server.Mobiles
|
|||
{
|
||||
public class RuneBeetle : BaseCreature
|
||||
{
|
||||
private static Dictionary<Mobile, ExpireTimer> m_Table = new Dictionary<Mobile, ExpireTimer>();
|
||||
private static readonly Dictionary<Mobile, ExpireTimer> m_Table = new Dictionary<Mobile, ExpireTimer>();
|
||||
|
||||
[Constructible]
|
||||
public RuneBeetle() : base(AIType.AI_Mage, FightMode.Closest, 10, 1, 0.2, 0.4)
|
||||
|
|
@ -42,7 +42,6 @@ namespace Server.Mobiles
|
|||
Fame = 15000;
|
||||
Karma = -15000;
|
||||
|
||||
|
||||
if (Utility.RandomDouble() < .25)
|
||||
PackItem(Seed.RandomBonsaiSeed());
|
||||
|
||||
|
|
@ -119,7 +118,7 @@ namespace Server.Mobiles
|
|||
{
|
||||
base.OnGaveMeleeAttack(defender);
|
||||
|
||||
if (0.05 <= Utility.RandomDouble())
|
||||
if (Utility.RandomDouble() >= 0.05)
|
||||
return;
|
||||
|
||||
/* Rune Corruption
|
||||
|
|
@ -212,8 +211,8 @@ namespace Server.Mobiles
|
|||
|
||||
private class ExpireTimer : Timer
|
||||
{
|
||||
private Mobile m_Mobile;
|
||||
private List<ResistanceMod> m_Mods;
|
||||
private readonly Mobile m_Mobile;
|
||||
private readonly List<ResistanceMod> m_Mods;
|
||||
|
||||
public ExpireTimer(Mobile m, List<ResistanceMod> mods, TimeSpan delay) : base(delay)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ namespace Server.Mobiles
|
|||
{
|
||||
public class TsukiWolf : BaseCreature
|
||||
{
|
||||
private static Dictionary<Mobile, ExpireTimer> m_Table = new Dictionary<Mobile, ExpireTimer>();
|
||||
private static readonly Dictionary<Mobile, ExpireTimer> m_Table = new Dictionary<Mobile, ExpireTimer>();
|
||||
|
||||
[Constructible]
|
||||
public TsukiWolf()
|
||||
|
|
@ -102,7 +102,7 @@ namespace Server.Mobiles
|
|||
{
|
||||
base.OnGaveMeleeAttack(defender);
|
||||
|
||||
if (0.1 <= Utility.RandomDouble())
|
||||
if (Utility.RandomDouble() >= 0.1)
|
||||
return;
|
||||
|
||||
/* Blood Bath
|
||||
|
|
@ -155,8 +155,8 @@ namespace Server.Mobiles
|
|||
private class ExpireTimer : Timer
|
||||
{
|
||||
private int m_Count;
|
||||
private Mobile m_From;
|
||||
private Mobile m_Mobile;
|
||||
private readonly Mobile m_From;
|
||||
private readonly Mobile m_Mobile;
|
||||
|
||||
public ExpireTimer(Mobile m, Mobile from)
|
||||
: base(TimeSpan.FromSeconds(1.0), TimeSpan.FromSeconds(1.0))
|
||||
|
|
|
|||
|
|
@ -44,7 +44,6 @@ namespace Server.Mobiles
|
|||
PackItem(new Eggs(2));
|
||||
}
|
||||
|
||||
|
||||
public Yamandon(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
|
@ -89,7 +88,7 @@ namespace Server.Mobiles
|
|||
if (attacker is BaseCreature creature && creature.BardProvoked)
|
||||
return;
|
||||
|
||||
if (0.2 > Utility.RandomDouble())
|
||||
if (Utility.RandomDouble() < 0.2)
|
||||
{
|
||||
/* Counterattack with Hit Poison Area
|
||||
* 20-25 damage, unresistable
|
||||
|
|
@ -117,7 +116,7 @@ namespace Server.Mobiles
|
|||
|
||||
foreach (Mobile m in eable)
|
||||
{
|
||||
if (m == this || !(CanBeHarmful(m) || m.Player && m.Alive))
|
||||
if (m == this || !(CanBeHarmful(m) || (m.Player && m.Alive)))
|
||||
continue;
|
||||
|
||||
if (!(m is BaseCreature bc) || !(bc.Controlled || bc.Summoned || bc.Team != Team))
|
||||
|
|
|
|||
|
|
@ -36,7 +36,6 @@ namespace Server.Mobiles
|
|||
Fame = 12000;
|
||||
Karma = -12000;
|
||||
|
||||
|
||||
PackItem(new GreenGourd());
|
||||
PackItem(new ExecutionersAxe());
|
||||
|
||||
|
|
@ -86,7 +85,6 @@ namespace Server.Mobiles
|
|||
|
||||
public override WeaponAbility GetWeaponAbility() => WeaponAbility.DoubleStrike;
|
||||
|
||||
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot(LootPack.FilthyRich, 3);
|
||||
|
|
@ -99,7 +97,7 @@ namespace Server.Mobiles
|
|||
{
|
||||
base.OnGaveMeleeAttack(defender);
|
||||
|
||||
if (0.1 > Utility.RandomDouble())
|
||||
if (Utility.RandomDouble() < 0.1)
|
||||
{
|
||||
/* Maniacal laugh
|
||||
* Cliloc: 1070840
|
||||
|
|
|
|||
|
|
@ -38,7 +38,6 @@ namespace Server.Mobiles
|
|||
Fame = 9000;
|
||||
Karma = -9000;
|
||||
|
||||
|
||||
PackItem(new GreenGourd());
|
||||
PackItem(new ExecutionersAxe());
|
||||
|
||||
|
|
@ -86,7 +85,6 @@ namespace Server.Mobiles
|
|||
|
||||
public override WeaponAbility GetWeaponAbility() => WeaponAbility.DoubleStrike;
|
||||
|
||||
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot(LootPack.FilthyRich);
|
||||
|
|
@ -100,7 +98,7 @@ namespace Server.Mobiles
|
|||
{
|
||||
base.OnGaveMeleeAttack(defender);
|
||||
|
||||
if (0.1 > Utility.RandomDouble())
|
||||
if (Utility.RandomDouble() < 0.1)
|
||||
{
|
||||
/* Maniacal laugh
|
||||
* Cliloc: 1070840
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ namespace Server.Mobiles
|
|||
{
|
||||
base.OnGaveMeleeAttack(defender);
|
||||
|
||||
if (0.1 > Utility.RandomDouble())
|
||||
if (Utility.RandomDouble() < 0.1)
|
||||
{
|
||||
/* Maniacal laugh
|
||||
* Cliloc: 1070840
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue