Adds style cop (#109)
This commit is contained in:
parent
3e715bcb60
commit
556a17aba8
1725 changed files with 33831 additions and 38046 deletions
|
|
@ -41,7 +41,6 @@ namespace Server.Mobiles
|
|||
public override int Meat => 1;
|
||||
public override int Feathers => 25;
|
||||
|
||||
|
||||
public override int GetAngerSound() => 0x4D9;
|
||||
|
||||
public override int GetIdleSound() => 0x4D8;
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ namespace Server.Mobiles
|
|||
Body = Utility.RandomList(0xE8, 0xE9);
|
||||
BaseSoundID = 0x64;
|
||||
|
||||
if (0.5 >= Utility.RandomDouble())
|
||||
if (Utility.RandomDouble() <= 0.5)
|
||||
Hue = 0x901;
|
||||
|
||||
SetStr(77, 111);
|
||||
|
|
|
|||
|
|
@ -49,10 +49,10 @@ namespace Server.Mobiles
|
|||
public override string CorpseName => "a cow corpse";
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public DateTime MilkedOn{ get; set; }
|
||||
public DateTime MilkedOn { get; set; }
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public int Milk{ get; set; }
|
||||
public int Milk { get; set; }
|
||||
|
||||
public override string DefaultName => "a cow";
|
||||
|
||||
|
|
|
|||
|
|
@ -78,8 +78,6 @@ namespace Server.Mobiles
|
|||
int version = reader.ReadInt();
|
||||
}
|
||||
|
||||
#region Pack Animal Methods
|
||||
|
||||
public override bool OnBeforeDeath()
|
||||
{
|
||||
if (!base.OnBeforeDeath())
|
||||
|
|
@ -129,14 +127,12 @@ namespace Server.Mobiles
|
|||
|
||||
PackAnimal.GetContextMenuEntries(this, from, list);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
public class PackAnimalBackpackEntry : ContextMenuEntry
|
||||
{
|
||||
private BaseCreature m_Animal;
|
||||
private Mobile m_From;
|
||||
private readonly BaseCreature m_Animal;
|
||||
private readonly Mobile m_From;
|
||||
|
||||
public PackAnimalBackpackEntry(BaseCreature animal, Mobile from) : base(6145, 3)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -77,8 +77,6 @@ namespace Server.Mobiles
|
|||
int version = reader.ReadInt();
|
||||
}
|
||||
|
||||
#region Pack Animal Methods
|
||||
|
||||
public override bool OnBeforeDeath()
|
||||
{
|
||||
if (!base.OnBeforeDeath())
|
||||
|
|
@ -128,7 +126,5 @@ namespace Server.Mobiles
|
|||
|
||||
PackAnimal.GetContextMenuEntries(this, from, list);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
@ -105,10 +105,10 @@ namespace Server.Mobiles
|
|||
switch (version)
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
NextWoolTime = reader.ReadDeltaTime();
|
||||
break;
|
||||
}
|
||||
{
|
||||
NextWoolTime = reader.ReadDeltaTime();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,9 +28,9 @@ namespace Server.Mobiles
|
|||
public virtual TimeSpan MountAbilityDelay => TimeSpan.Zero;
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public DateTime NextMountAbility{ get; set; }
|
||||
public DateTime NextMountAbility { get; set; }
|
||||
|
||||
protected Item InternalItem{ get; private set; }
|
||||
protected Item InternalItem { get; private set; }
|
||||
|
||||
public virtual bool AllowMaleRider => true;
|
||||
public virtual bool AllowFemaleRider => true;
|
||||
|
|
@ -160,20 +160,20 @@ namespace Server.Mobiles
|
|||
switch (version)
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
NextMountAbility = reader.ReadDateTime();
|
||||
goto case 0;
|
||||
}
|
||||
{
|
||||
NextMountAbility = reader.ReadDateTime();
|
||||
goto case 0;
|
||||
}
|
||||
case 0:
|
||||
{
|
||||
m_Rider = reader.ReadMobile();
|
||||
InternalItem = reader.ReadItem();
|
||||
{
|
||||
m_Rider = reader.ReadMobile();
|
||||
InternalItem = reader.ReadItem();
|
||||
|
||||
if (InternalItem == null)
|
||||
Delete();
|
||||
if (InternalItem == null)
|
||||
Delete();
|
||||
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -224,8 +224,8 @@ namespace Server.Mobiles
|
|||
if (from.InRange(this, 1))
|
||||
{
|
||||
bool canAccess = from.AccessLevel >= AccessLevel.GameMaster
|
||||
|| Controlled && ControlMaster == from
|
||||
|| Summoned && SummonMaster == from;
|
||||
|| (Controlled && ControlMaster == from)
|
||||
|| (Summoned && SummonMaster == from);
|
||||
|
||||
if (canAccess)
|
||||
{
|
||||
|
|
@ -334,14 +334,14 @@ namespace Server.Mobiles
|
|||
switch (version)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
m_Mount = reader.ReadMobile() as BaseMount;
|
||||
{
|
||||
m_Mount = reader.ReadMobile() as BaseMount;
|
||||
|
||||
if (m_Mount == null)
|
||||
Delete();
|
||||
if (m_Mount == null)
|
||||
Delete();
|
||||
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,8 +7,7 @@ namespace Server.Mobiles
|
|||
public class Beetle : BaseMount
|
||||
{
|
||||
[Constructible]
|
||||
public Beetle(string name = "a giant beetle") :
|
||||
base(name, 0x317, 0x3EBC, AIType.AI_Melee, FightMode.Closest, 10, 1, 0.25, 0.5)
|
||||
public Beetle(string name = "a giant beetle") : base(name, 0x317, 0x3EBC, AIType.AI_Melee, FightMode.Closest, 10, 1, 0.25, 0.5)
|
||||
{
|
||||
SetStr(300);
|
||||
SetDex(100);
|
||||
|
|
@ -95,8 +94,6 @@ namespace Server.Mobiles
|
|||
int version = reader.ReadInt();
|
||||
}
|
||||
|
||||
#region Pack Animal Methods
|
||||
|
||||
public override bool OnBeforeDeath()
|
||||
{
|
||||
if (!base.OnBeforeDeath())
|
||||
|
|
@ -141,7 +138,5 @@ namespace Server.Mobiles
|
|||
|
||||
PackAnimal.GetContextMenuEntries(this, from, list);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,8 +3,7 @@ namespace Server.Mobiles
|
|||
public class DesertOstard : BaseMount
|
||||
{
|
||||
[Constructible]
|
||||
public DesertOstard(string name = "a desert ostard") :
|
||||
base(name, 0xD2, 0x3EA3, AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
|
||||
public DesertOstard(string name = "a desert ostard") : base(name, 0xD2, 0x3EA3, AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
BaseSoundID = 0x270;
|
||||
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@ namespace Server.Mobiles
|
|||
public IMount Mount => this;
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public bool IsRewardItem{ get; set; }
|
||||
public bool IsRewardItem { get; set; }
|
||||
|
||||
public override void GetProperties(ObjectPropertyList list)
|
||||
{
|
||||
|
|
@ -161,7 +161,7 @@ namespace Server.Mobiles
|
|||
return false;
|
||||
}
|
||||
|
||||
if (IsRewardItem && !RewardSystem.CheckIsUsableBy(from, this) || !BaseMount.CheckMountAllowed(from))
|
||||
if ((IsRewardItem && !RewardSystem.CheckIsUsableBy(from, this)) || !BaseMount.CheckMountAllowed(from))
|
||||
return false;
|
||||
|
||||
if (from.Mounted)
|
||||
|
|
@ -228,29 +228,29 @@ namespace Server.Mobiles
|
|||
switch (version)
|
||||
{
|
||||
case 3:
|
||||
{
|
||||
m_IsDonationItem = reader.ReadBool();
|
||||
goto case 2;
|
||||
}
|
||||
{
|
||||
m_IsDonationItem = reader.ReadBool();
|
||||
goto case 2;
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
IsRewardItem = reader.ReadBool();
|
||||
goto case 0;
|
||||
}
|
||||
{
|
||||
IsRewardItem = reader.ReadBool();
|
||||
goto case 0;
|
||||
}
|
||||
case 1:
|
||||
reader.ReadInt();
|
||||
goto case 0;
|
||||
case 0:
|
||||
{
|
||||
m_MountedID = reader.ReadInt();
|
||||
m_RegularID = reader.ReadInt();
|
||||
m_Rider = reader.ReadMobile();
|
||||
{
|
||||
m_MountedID = reader.ReadInt();
|
||||
m_RegularID = reader.ReadInt();
|
||||
m_Rider = reader.ReadMobile();
|
||||
|
||||
if (m_MountedID == 0x3EA2)
|
||||
m_MountedID = 0x3EAA;
|
||||
if (m_MountedID == 0x3EA2)
|
||||
m_MountedID = 0x3EAA;
|
||||
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
AddFollowers();
|
||||
|
|
@ -261,7 +261,7 @@ namespace Server.Mobiles
|
|||
|
||||
public override DeathMoveResult OnParentDeath(Mobile parent)
|
||||
{
|
||||
Rider = null; //get off, move to pack
|
||||
Rider = null; // get off, move to pack
|
||||
|
||||
return DeathMoveResult.RemainEquipped;
|
||||
}
|
||||
|
|
@ -327,10 +327,10 @@ namespace Server.Mobiles
|
|||
|
||||
private class EtherealSpell : Spell
|
||||
{
|
||||
private static SpellInfo m_Info = new SpellInfo("Ethereal Mount", "", 230);
|
||||
private static readonly SpellInfo m_Info = new SpellInfo("Ethereal Mount", "", 230);
|
||||
|
||||
private EtherealMount m_Mount;
|
||||
private Mobile m_Rider;
|
||||
private readonly EtherealMount m_Mount;
|
||||
private readonly Mobile m_Rider;
|
||||
|
||||
private bool m_Stop;
|
||||
|
||||
|
|
@ -390,7 +390,7 @@ namespace Server.Mobiles
|
|||
Caster.SendLocalizedMessage(
|
||||
1049455); // You have been disrupted while attempting to summon your ethereal mount!
|
||||
|
||||
//m_Mount.UnmountMe();
|
||||
// m_Mount.UnmountMe();
|
||||
}
|
||||
|
||||
public override void OnCast()
|
||||
|
|
|
|||
|
|
@ -6,8 +6,7 @@ namespace Server.Mobiles
|
|||
public class FireSteed : BaseMount
|
||||
{
|
||||
[Constructible]
|
||||
public FireSteed(string name = "a fire steed") :
|
||||
base(name, 0xBE, 0x3E9E, AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
|
||||
public FireSteed(string name = "a fire steed") : base(name, 0xBE, 0x3E9E, AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
BaseSoundID = 0xA8;
|
||||
|
||||
|
|
|
|||
|
|
@ -3,8 +3,7 @@ namespace Server.Mobiles
|
|||
public class ForestOstard : BaseMount
|
||||
{
|
||||
[Constructible]
|
||||
public ForestOstard(string name = "a forest ostard") :
|
||||
base(name, 0xDB, 0x3EA5, AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
|
||||
public ForestOstard(string name = "a forest ostard") : base(name, 0xDB, 0x3EA5, AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
Hue = Utility.RandomSlimeHue() | 0x8000;
|
||||
|
||||
|
|
|
|||
|
|
@ -3,8 +3,7 @@ namespace Server.Mobiles
|
|||
public class FrenziedOstard : BaseMount
|
||||
{
|
||||
[Constructible]
|
||||
public FrenziedOstard(string name = "a frenzied ostard") :
|
||||
base(name, 0xDA, 0x3EA4, AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
|
||||
public FrenziedOstard(string name = "a frenzied ostard") : base(name, 0xDA, 0x3EA4, AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
Hue = Race.Human.RandomHairHue() | 0x8000;
|
||||
|
||||
|
|
|
|||
|
|
@ -3,8 +3,7 @@ namespace Server.Mobiles
|
|||
public class HellSteed : BaseMount
|
||||
{
|
||||
[Constructible]
|
||||
public HellSteed(string name = "a hellsteed") :
|
||||
base(name, 793, 0x3EBB, AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
|
||||
public HellSteed(string name = "a hellsteed") : base(name, 793, 0x3EBB, AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
SetStats(this);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ namespace Server.Mobiles
|
|||
{
|
||||
public class Hiryu : BaseMount
|
||||
{
|
||||
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 Hiryu()
|
||||
|
|
@ -73,29 +73,6 @@ namespace Server.Mobiles
|
|||
{
|
||||
int rand = Utility.Random(1075);
|
||||
|
||||
/*
|
||||
1000 1075 No Hue Color 93.02% 0x0
|
||||
*
|
||||
10 1075 Ice Green 0.93% 0x847F
|
||||
10 1075 Light Blue 0.93% 0x848D
|
||||
10 1075 Strong Cyan 0.93% 0x8495
|
||||
10 1075 Agapite 0.93% 0x8899
|
||||
10 1075 Gold 0.93% 0x8032
|
||||
*
|
||||
8 1075 Blue and Yellow 0.74% 0x8487
|
||||
*
|
||||
5 1075 Ice Blue 0.47% 0x8482
|
||||
*
|
||||
3 1075 Cyan 0.28% 0x8123
|
||||
3 1075 Light Green 0.28% 0x8295
|
||||
*
|
||||
2 1075 Strong Yellow 0.19% 0x8037
|
||||
2 1075 Green 0.19% 0x8030 //this one is an approximation
|
||||
*
|
||||
1 1075 Strong Purple 0.09% 0x8490
|
||||
1 1075 Strong Green 0.09% 0x855C
|
||||
* */
|
||||
|
||||
if (rand <= 0)
|
||||
return 0x855C;
|
||||
if (rand <= 1)
|
||||
|
|
@ -123,11 +100,9 @@ namespace Server.Mobiles
|
|||
if (rand <= 74)
|
||||
return 0x847F;
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
public override int GetAngerSound() => 0x4FE;
|
||||
|
||||
public override int GetIdleSound() => 0x4FD;
|
||||
|
|
@ -148,7 +123,7 @@ namespace Server.Mobiles
|
|||
{
|
||||
base.OnGaveMeleeAttack(defender);
|
||||
|
||||
if (0.1 <= Utility.RandomDouble())
|
||||
if (Utility.RandomDouble() >= 0.1)
|
||||
return;
|
||||
|
||||
/* Grasping Claw
|
||||
|
|
@ -193,10 +168,10 @@ namespace Server.Mobiles
|
|||
int version = reader.ReadInt();
|
||||
|
||||
if (version == 0)
|
||||
Timer.DelayCall(TimeSpan.Zero, delegate { Hue = GetHue(); });
|
||||
Timer.DelayCall(TimeSpan.Zero, () => { Hue = GetHue(); });
|
||||
|
||||
if (version <= 1)
|
||||
Timer.DelayCall(TimeSpan.Zero, delegate
|
||||
Timer.DelayCall(TimeSpan.Zero, () =>
|
||||
{
|
||||
if (InternalItem != null) InternalItem.Hue = Hue;
|
||||
});
|
||||
|
|
@ -212,8 +187,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)
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ namespace Server.Mobiles
|
|||
"Server.Mobiles.TanHorse")]
|
||||
public class Horse : BaseMount
|
||||
{
|
||||
private static int[] m_IDs =
|
||||
private static readonly int[] m_IDs =
|
||||
{
|
||||
0xC8, 0x3E9F,
|
||||
0xE2, 0x3EA0,
|
||||
|
|
@ -13,8 +13,7 @@ namespace Server.Mobiles
|
|||
};
|
||||
|
||||
[Constructible]
|
||||
public Horse(string name = "a horse") :
|
||||
base(name, 0xE2, 0x3EA0, AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
|
||||
public Horse(string name = "a horse") : base(name, 0xE2, 0x3EA0, AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
int random = Utility.Random(4);
|
||||
|
||||
|
|
|
|||
|
|
@ -7,8 +7,7 @@ namespace Server.Mobiles
|
|||
public class Kirin : BaseMount
|
||||
{
|
||||
[Constructible]
|
||||
public Kirin(string name = "a ki-rin") :
|
||||
base(name, 132, 0x3EAD, AIType.AI_Mage, FightMode.Evil, 10, 1, 0.2, 0.4)
|
||||
public Kirin(string name = "a ki-rin") : base(name, 132, 0x3EAD, AIType.AI_Mage, FightMode.Evil, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
BaseSoundID = 0x3C5;
|
||||
|
||||
|
|
@ -72,16 +71,15 @@ namespace Server.Mobiles
|
|||
|
||||
public override bool DoMountAbility(int damage, Mobile attacker)
|
||||
{
|
||||
if (Rider == null || attacker == null) //sanity
|
||||
if (Rider == null || attacker == null) // sanity
|
||||
return false;
|
||||
|
||||
if (Rider.Hits - damage < 30 && Rider.Map == attacker.Map && Rider.InRange(attacker, 18)
|
||||
) //Range and map checked here instead of other base fuction because of abiliites that don't need to check this
|
||||
if (Rider.Hits - damage < 30 && Rider.Map == attacker.Map && Rider.InRange(attacker, 18)) // Range and map checked here instead of other base fuction because of abiliites that don't need to check this
|
||||
{
|
||||
attacker.BoltEffect(0);
|
||||
// 35~100 damage, unresistable, by the Ki-rin.
|
||||
attacker.Damage(Utility.RandomMinMax(35, 100), this,
|
||||
false); //Don't inform mount about this damage, Still unsure wether or not it's flagged as the mount doing damage or the player. If changed to player, without the extra bool it'd be an infinite loop
|
||||
false); // Don't inform mount about this damage, Still unsure wether or not it's flagged as the mount doing damage or the player. If changed to player, without the extra bool it'd be an infinite loop
|
||||
|
||||
Rider.LocalOverheadMessage(MessageType.Regular, 0x3B2,
|
||||
1042534); // Your mount calls down the forces of nature on your opponent.
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ namespace Server.Mobiles
|
|||
{
|
||||
public class LesserHiryu : BaseMount
|
||||
{
|
||||
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 LesserHiryu()
|
||||
|
|
@ -72,12 +72,12 @@ namespace Server.Mobiles
|
|||
|
||||
/*
|
||||
|
||||
500 527 No Hue Color 94.88% 0
|
||||
10 527 Green 1.90% 0x8295
|
||||
10 527 Green 1.90% 0x8163 (Very Close to Above Green) //this one is an approximation
|
||||
5 527 Dark Green 0.95% 0x87D4
|
||||
1 527 Valorite 0.19% 0x88AB
|
||||
1 527 Midnight Blue 0.19% 0x8258
|
||||
500 527 No Hue Color 94.88% 0
|
||||
10 527 Green 1.90% 0x8295
|
||||
10 527 Green 1.90% 0x8163 (Very Close to Above Green) //this one is an approximation
|
||||
5 527 Dark Green 0.95% 0x87D4
|
||||
1 527 Valorite 0.19% 0x88AB
|
||||
1 527 Midnight Blue 0.19% 0x8258
|
||||
|
||||
* */
|
||||
|
||||
|
|
@ -92,11 +92,9 @@ namespace Server.Mobiles
|
|||
if (rand <= 26)
|
||||
return 0x8295;
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
public override bool OverrideBondingReqs()
|
||||
{
|
||||
if (ControlMaster.Skills.Bushido.Base >= 90.0)
|
||||
|
|
@ -142,7 +140,7 @@ namespace Server.Mobiles
|
|||
{
|
||||
base.OnGaveMeleeAttack(defender);
|
||||
|
||||
if (0.1 <= Utility.RandomDouble())
|
||||
if (Utility.RandomDouble() >= 0.1)
|
||||
return;
|
||||
|
||||
/* Grasping Claw
|
||||
|
|
@ -187,10 +185,10 @@ namespace Server.Mobiles
|
|||
int version = reader.ReadInt();
|
||||
|
||||
if (version == 0)
|
||||
Timer.DelayCall(TimeSpan.Zero, delegate { Hue = GetHue(); });
|
||||
Timer.DelayCall(TimeSpan.Zero, () => Hue = GetHue());
|
||||
|
||||
if (version <= 1)
|
||||
Timer.DelayCall(TimeSpan.Zero, delegate
|
||||
Timer.DelayCall(TimeSpan.Zero, () =>
|
||||
{
|
||||
if (InternalItem != null) InternalItem.Hue = Hue;
|
||||
});
|
||||
|
|
@ -206,8 +204,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)
|
||||
|
|
|
|||
|
|
@ -5,8 +5,7 @@ namespace Server.Mobiles
|
|||
public class Nightmare : BaseMount
|
||||
{
|
||||
[Constructible]
|
||||
public Nightmare(string name = "a nightmare") :
|
||||
base(name, 0x74, 0x3EA7, AIType.AI_Mage, FightMode.Closest, 10, 1, 0.2, 0.4)
|
||||
public Nightmare(string name = "a nightmare") : base(name, 0x74, 0x3EA7, AIType.AI_Mage, FightMode.Closest, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
BaseSoundID = Core.AOS ? 0xA8 : 0x16A;
|
||||
|
||||
|
|
@ -46,23 +45,23 @@ namespace Server.Mobiles
|
|||
switch (Utility.Random(3))
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
BodyValue = 116;
|
||||
ItemID = 16039;
|
||||
break;
|
||||
}
|
||||
{
|
||||
BodyValue = 116;
|
||||
ItemID = 16039;
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
{
|
||||
BodyValue = 178;
|
||||
ItemID = 16041;
|
||||
break;
|
||||
}
|
||||
{
|
||||
BodyValue = 178;
|
||||
ItemID = 16041;
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
BodyValue = 179;
|
||||
ItemID = 16055;
|
||||
break;
|
||||
}
|
||||
{
|
||||
BodyValue = 179;
|
||||
ItemID = 16055;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
PackItem(new SulfurousAsh(Utility.RandomMinMax(3, 5)));
|
||||
|
|
|
|||
|
|
@ -3,8 +3,7 @@ namespace Server.Mobiles
|
|||
public class RidableLlama : BaseMount
|
||||
{
|
||||
[Constructible]
|
||||
public RidableLlama(string name = "a ridable llama") :
|
||||
base(name, 0xDC, 0x3EA6, AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
|
||||
public RidableLlama(string name = "a ridable llama") : base(name, 0xDC, 0x3EA6, AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
BaseSoundID = 0x3F3;
|
||||
|
||||
|
|
|
|||
|
|
@ -3,8 +3,7 @@ namespace Server.Mobiles
|
|||
public class Ridgeback : BaseMount
|
||||
{
|
||||
[Constructible]
|
||||
public Ridgeback(string name = "a ridgeback") :
|
||||
base(name, 187, 0x3EBA, AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
|
||||
public Ridgeback(string name = "a ridgeback") : base(name, 187, 0x3EBA, AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
BaseSoundID = 0x3F3;
|
||||
|
||||
|
|
|
|||
|
|
@ -3,8 +3,7 @@ namespace Server.Mobiles
|
|||
public class SavageRidgeback : BaseMount
|
||||
{
|
||||
[Constructible]
|
||||
public SavageRidgeback(string name = "a savage ridgeback") :
|
||||
base(name, 188, 0x3EB8, AIType.AI_Melee, FightMode.Aggressor, 10, 1, 0.2, 0.4)
|
||||
public SavageRidgeback(string name = "a savage ridgeback") : base(name, 188, 0x3EB8, AIType.AI_Melee, FightMode.Aggressor, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
BaseSoundID = 0x3F3;
|
||||
|
||||
|
|
|
|||
|
|
@ -3,8 +3,7 @@ namespace Server.Mobiles
|
|||
public class ScaledSwampDragon : BaseMount
|
||||
{
|
||||
[Constructible]
|
||||
public ScaledSwampDragon(string name = "a swamp dragon") :
|
||||
base(name, 0x31F, 0x3EBE, AIType.AI_Melee, FightMode.Aggressor, 10, 1, 0.2, 0.4)
|
||||
public ScaledSwampDragon(string name = "a swamp dragon") : base(name, 0x31F, 0x3EBE, AIType.AI_Melee, FightMode.Aggressor, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
SetStr(201, 300);
|
||||
SetDex(66, 85);
|
||||
|
|
|
|||
|
|
@ -3,8 +3,7 @@ namespace Server.Mobiles
|
|||
public class SeaHorse : BaseMount
|
||||
{
|
||||
[Constructible]
|
||||
public SeaHorse(string name = "a sea horse") :
|
||||
base(name, 0x90, 0x3EB3, AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
|
||||
public SeaHorse(string name = "a sea horse") : base(name, 0x90, 0x3EB3, AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
InitStats(Utility.Random(50, 30), Utility.Random(50, 30), 10);
|
||||
Skills.MagicResist.Base = 25.0 + Utility.RandomDouble() * 5.0;
|
||||
|
|
|
|||
|
|
@ -3,8 +3,7 @@ namespace Server.Mobiles
|
|||
public class SilverSteed : BaseMount
|
||||
{
|
||||
[Constructible]
|
||||
public SilverSteed(string name = "a silver steed") :
|
||||
base(name, 0x75, 0x3EA8, AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
|
||||
public SilverSteed(string name = "a silver steed") : base(name, 0x75, 0x3EA8, AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
InitStats(Utility.Random(50, 30), Utility.Random(50, 30), 10);
|
||||
Skills.MagicResist.Base = 25.0 + Utility.RandomDouble() * 5.0;
|
||||
|
|
|
|||
|
|
@ -3,8 +3,7 @@ namespace Server.Mobiles
|
|||
public class SkeletalMount : BaseMount
|
||||
{
|
||||
[Constructible]
|
||||
public SkeletalMount(string name = null) :
|
||||
base(name, 793, 0x3EBB, AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
|
||||
public SkeletalMount(string name = null) : base(name, 793, 0x3EBB, AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
SetStr(91, 100);
|
||||
SetDex(46, 55);
|
||||
|
|
@ -56,12 +55,12 @@ namespace Server.Mobiles
|
|||
switch (version)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
Tamable = false;
|
||||
MinTameSkill = 0.0;
|
||||
ControlSlots = 0;
|
||||
break;
|
||||
}
|
||||
{
|
||||
Tamable = false;
|
||||
MinTameSkill = 0.0;
|
||||
ControlSlots = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,8 +11,7 @@ namespace Server.Mobiles
|
|||
private bool m_HasBarding;
|
||||
|
||||
[Constructible]
|
||||
public SwampDragon(string name = "a swamp dragon") :
|
||||
base(name, 0x31A, 0x3EBD, AIType.AI_Melee, FightMode.Aggressor, 10, 1, 0.2, 0.4)
|
||||
public SwampDragon(string name = "a swamp dragon") : base(name, 0x31A, 0x3EBD, AIType.AI_Melee, FightMode.Aggressor, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
BaseSoundID = 0x16A;
|
||||
|
||||
|
|
@ -181,14 +180,14 @@ namespace Server.Mobiles
|
|||
switch (version)
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
m_BardingExceptional = reader.ReadBool();
|
||||
m_BardingCrafter = reader.ReadMobile();
|
||||
m_HasBarding = reader.ReadBool();
|
||||
m_BardingHP = reader.ReadInt();
|
||||
m_BardingResource = (CraftResource)reader.ReadInt();
|
||||
break;
|
||||
}
|
||||
{
|
||||
m_BardingExceptional = reader.ReadBool();
|
||||
m_BardingCrafter = reader.ReadMobile();
|
||||
m_HasBarding = reader.ReadBool();
|
||||
m_BardingHP = reader.ReadInt();
|
||||
m_BardingResource = (CraftResource)reader.ReadInt();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (Hue == 0 && !m_HasBarding)
|
||||
|
|
|
|||
|
|
@ -7,8 +7,7 @@ namespace Server.Mobiles
|
|||
public class Unicorn : BaseMount
|
||||
{
|
||||
[Constructible]
|
||||
public Unicorn(string name = "a unicorn") :
|
||||
base(name, 0x7A, 0x3EB4, AIType.AI_Mage, FightMode.Evil, 10, 1, 0.2, 0.4)
|
||||
public Unicorn(string name = "a unicorn") : base(name, 0x7A, 0x3EB4, AIType.AI_Mage, FightMode.Evil, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
BaseSoundID = 0x4BC;
|
||||
|
||||
|
|
@ -71,7 +70,7 @@ namespace Server.Mobiles
|
|||
|
||||
public override bool DoMountAbility(int damage, Mobile attacker)
|
||||
{
|
||||
if (Rider == null || attacker == null) //sanity
|
||||
if (Rider == null || attacker == null) // sanity
|
||||
return false;
|
||||
|
||||
if (Rider.Poisoned && Rider.Hits - damage < 40)
|
||||
|
|
@ -85,7 +84,7 @@ namespace Server.Mobiles
|
|||
chanceToCure /= 100;
|
||||
|
||||
if (chanceToCure > Utility.Random(100))
|
||||
if (Rider.CurePoison(this)) //TODO: Confirm if mount is the one flagged for curing it or the rider is
|
||||
if (Rider.CurePoison(this)) // TODO: Confirm if mount is the one flagged for curing it or the rider is
|
||||
{
|
||||
Rider.LocalOverheadMessage(MessageType.Regular, 0x3B2, true,
|
||||
"Your mount senses you are in danger and aids you with magic.");
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ namespace Server.Mobiles
|
|||
public override string DefaultName => "a giant snake";
|
||||
|
||||
public override Poison PoisonImmune => Poison.Greater;
|
||||
public override Poison HitPoison => 0.8 >= Utility.RandomDouble() ? Poison.Greater : Poison.Deadly;
|
||||
public override Poison HitPoison => Utility.RandomDouble() <= 0.8 ? Poison.Greater : Poison.Deadly;
|
||||
|
||||
public override bool DeathAdderCharmable => true;
|
||||
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ namespace Server.Mobiles
|
|||
break;
|
||||
}
|
||||
|
||||
if (0.025 > Utility.RandomDouble())
|
||||
if (Utility.RandomDouble() < 0.025)
|
||||
PackItem(new GlacialStaff());
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue