Reorganizes Project (#41)
This commit is contained in:
parent
08bf44af9a
commit
3614a66aee
3499 changed files with 79 additions and 55 deletions
111
Projects/Scripts/Mobiles/Monsters/Misc/Melee/AnimatedWeapon.cs
Normal file
111
Projects/Scripts/Mobiles/Monsters/Misc/Melee/AnimatedWeapon.cs
Normal file
|
|
@ -0,0 +1,111 @@
|
|||
using System;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class AnimatedWeapon : BaseCreature
|
||||
{
|
||||
[Constructible]
|
||||
public AnimatedWeapon(Mobile caster, int level)
|
||||
: base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.3, 0.6)
|
||||
{
|
||||
Body = 692;
|
||||
|
||||
SetStr(10 + level);
|
||||
SetDex(10 + level);
|
||||
SetInt(10);
|
||||
|
||||
SetHits(20 + level * 3 / 2);
|
||||
SetStam(10 + level);
|
||||
SetMana(0);
|
||||
|
||||
if (level >= 120)
|
||||
SetDamage(14, 18);
|
||||
else if (level >= 105)
|
||||
SetDamage(13, 17);
|
||||
else if (level >= 90)
|
||||
SetDamage(12, 15);
|
||||
else if (level >= 75)
|
||||
SetDamage(11, 14);
|
||||
else if (level >= 60)
|
||||
SetDamage(10, 12);
|
||||
else if (level >= 45)
|
||||
SetDamage(9, 11);
|
||||
else if (level >= 30)
|
||||
SetDamage(8, 9);
|
||||
else
|
||||
SetDamage(7, 8);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 60);
|
||||
SetDamageType(ResistanceType.Poison, 20);
|
||||
SetDamageType(ResistanceType.Energy, 20);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 40, 50);
|
||||
SetResistance(ResistanceType.Fire, 30, 40);
|
||||
SetResistance(ResistanceType.Cold, 30, 40);
|
||||
SetResistance(ResistanceType.Poison, 100);
|
||||
SetResistance(ResistanceType.Energy, 20, 30);
|
||||
|
||||
SetSkill(SkillName.MagicResist, level);
|
||||
SetSkill(SkillName.Wrestling, level);
|
||||
SetSkill(SkillName.Anatomy, caster.Skills.Anatomy.Value / 2);
|
||||
SetSkill(SkillName.Tactics, caster.Skills.Tactics.Value / 2);
|
||||
|
||||
Fame = 0;
|
||||
Karma = 0;
|
||||
|
||||
ControlSlots = 4;
|
||||
}
|
||||
|
||||
public AnimatedWeapon(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "an animated weapon corpse";
|
||||
public override bool DeleteCorpseOnDeath => true;
|
||||
public override bool IsHouseSummonable => true;
|
||||
|
||||
public override double DispelDifficulty => 0.0;
|
||||
public override double DispelFocus => 20.0;
|
||||
|
||||
public override string DefaultName => "an animated weapon";
|
||||
|
||||
public override bool BleedImmune => true;
|
||||
public override Poison PoisonImmune => Poison.Lethal;
|
||||
|
||||
public override double GetFightModeRanking(Mobile m, FightMode acqType, bool bPlayerOnly)
|
||||
{
|
||||
return m.Str / Math.Max(GetDistanceToSqrt(m), 1.0);
|
||||
}
|
||||
|
||||
public override int GetAngerSound()
|
||||
{
|
||||
return 0x23A;
|
||||
}
|
||||
|
||||
public override int GetAttackSound()
|
||||
{
|
||||
return 0x3B8;
|
||||
}
|
||||
|
||||
public override int GetHurtSound()
|
||||
{
|
||||
return 0x23A;
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
/*int version = */
|
||||
reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
117
Projects/Scripts/Mobiles/Monsters/Misc/Melee/BladeSpirits.cs
Normal file
117
Projects/Scripts/Mobiles/Monsters/Misc/Melee/BladeSpirits.cs
Normal file
|
|
@ -0,0 +1,117 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class BladeSpirits : BaseCreature
|
||||
{
|
||||
[Constructible]
|
||||
public BladeSpirits()
|
||||
: base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.3, 0.6)
|
||||
{
|
||||
Body = 574;
|
||||
|
||||
SetStr(150);
|
||||
SetDex(150);
|
||||
SetInt(100);
|
||||
|
||||
SetHits(Core.SE ? 160 : 80);
|
||||
SetStam(250);
|
||||
SetMana(0);
|
||||
|
||||
SetDamage(10, 14);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 60);
|
||||
SetDamageType(ResistanceType.Poison, 20);
|
||||
SetDamageType(ResistanceType.Energy, 20);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 30, 40);
|
||||
SetResistance(ResistanceType.Fire, 40, 50);
|
||||
SetResistance(ResistanceType.Cold, 30, 40);
|
||||
SetResistance(ResistanceType.Poison, 100);
|
||||
SetResistance(ResistanceType.Energy, 20, 30);
|
||||
|
||||
SetSkill(SkillName.MagicResist, 70.0);
|
||||
SetSkill(SkillName.Tactics, 90.0);
|
||||
SetSkill(SkillName.Wrestling, 90.0);
|
||||
|
||||
Fame = 0;
|
||||
Karma = 0;
|
||||
|
||||
VirtualArmor = 40;
|
||||
ControlSlots = Core.SE ? 2 : 1;
|
||||
}
|
||||
|
||||
public BladeSpirits(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "a blade spirit corpse";
|
||||
public override bool DeleteCorpseOnDeath => Core.AOS;
|
||||
public override bool IsHouseSummonable => true;
|
||||
|
||||
public override double DispelDifficulty => 0.0;
|
||||
public override double DispelFocus => 20.0;
|
||||
|
||||
public override string DefaultName => "a blade spirit";
|
||||
|
||||
public override bool BleedImmune => true;
|
||||
public override Poison PoisonImmune => Poison.Lethal;
|
||||
|
||||
public override double GetFightModeRanking(Mobile m, FightMode acqType, bool bPlayerOnly)
|
||||
{
|
||||
return (m.Str + m.Skills.Tactics.Value) / Math.Max(GetDistanceToSqrt(m), 1.0);
|
||||
}
|
||||
|
||||
public override int GetAngerSound()
|
||||
{
|
||||
return 0x23A;
|
||||
}
|
||||
|
||||
public override int GetAttackSound()
|
||||
{
|
||||
return 0x3B8;
|
||||
}
|
||||
|
||||
public override int GetHurtSound()
|
||||
{
|
||||
return 0x23A;
|
||||
}
|
||||
|
||||
public override void OnThink()
|
||||
{
|
||||
if (Core.SE && Summoned)
|
||||
{
|
||||
IPooledEnumerable<Mobile> eable = GetMobilesInRange(5);
|
||||
List<Mobile> spiritsOrVortexes = eable
|
||||
.Where(m => (m is EnergyVortex || m is BladeSpirits) && ((BaseCreature)m).Summoned).ToList();
|
||||
|
||||
eable.Free();
|
||||
|
||||
while (spiritsOrVortexes.Count > 6)
|
||||
{
|
||||
int index = Utility.Random(spiritsOrVortexes.Count);
|
||||
Dispel(spiritsOrVortexes[index]);
|
||||
spiritsOrVortexes.RemoveAt(index);
|
||||
}
|
||||
}
|
||||
|
||||
base.OnThink();
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
79
Projects/Scripts/Mobiles/Monsters/Misc/Melee/Centaur.cs
Normal file
79
Projects/Scripts/Mobiles/Monsters/Misc/Melee/Centaur.cs
Normal file
|
|
@ -0,0 +1,79 @@
|
|||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Centaur : BaseCreature
|
||||
{
|
||||
[Constructible]
|
||||
public Centaur() : base(AIType.AI_Melee, FightMode.Aggressor, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
Name = NameList.RandomName("centaur");
|
||||
Body = 101;
|
||||
BaseSoundID = 679;
|
||||
|
||||
SetStr(202, 300);
|
||||
SetDex(104, 260);
|
||||
SetInt(91, 100);
|
||||
|
||||
SetHits(130, 172);
|
||||
|
||||
SetDamage(13, 24);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 100);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 45, 55);
|
||||
SetResistance(ResistanceType.Fire, 35, 45);
|
||||
SetResistance(ResistanceType.Cold, 25, 35);
|
||||
SetResistance(ResistanceType.Poison, 45, 55);
|
||||
SetResistance(ResistanceType.Energy, 35, 45);
|
||||
|
||||
SetSkill(SkillName.Anatomy, 95.1, 115.0);
|
||||
SetSkill(SkillName.Archery, 95.1, 100.0);
|
||||
SetSkill(SkillName.MagicResist, 50.3, 80.0);
|
||||
SetSkill(SkillName.Tactics, 90.1, 100.0);
|
||||
SetSkill(SkillName.Wrestling, 95.1, 100.0);
|
||||
|
||||
Fame = 6500;
|
||||
Karma = 0;
|
||||
|
||||
VirtualArmor = 50;
|
||||
AddItem(new Bow());
|
||||
PackItem(new Arrow(Utility.RandomMinMax(80,
|
||||
90))); // OSI it is different: in a sub backpack, this is probably just a limitation of their engine
|
||||
}
|
||||
|
||||
public Centaur(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "a centaur corpse";
|
||||
|
||||
public override OppositionGroup OppositionGroup => OppositionGroup.FeyAndUndead;
|
||||
|
||||
public override int Meat => 1;
|
||||
public override int Hides => 8;
|
||||
public override HideType HideType => HideType.Spined;
|
||||
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot(LootPack.Rich);
|
||||
AddLoot(LootPack.Average);
|
||||
AddLoot(LootPack.Gems);
|
||||
}
|
||||
|
||||
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();
|
||||
|
||||
if (BaseSoundID == 678)
|
||||
BaseSoundID = 679;
|
||||
}
|
||||
}
|
||||
}
|
||||
125
Projects/Scripts/Mobiles/Monsters/Misc/Melee/EnergyVortex.cs
Normal file
125
Projects/Scripts/Mobiles/Monsters/Misc/Melee/EnergyVortex.cs
Normal file
|
|
@ -0,0 +1,125 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class EnergyVortex : BaseCreature
|
||||
{
|
||||
[Constructible]
|
||||
public EnergyVortex()
|
||||
: base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
if (Core.SE && 0.002 > Utility.RandomDouble()) // Per OSI FoF, it's a 1/500 chance.
|
||||
{
|
||||
// Llama vortex!
|
||||
Body = 0xDC;
|
||||
Hue = 0x76;
|
||||
}
|
||||
else
|
||||
{
|
||||
Body = 164;
|
||||
}
|
||||
|
||||
SetStr(200);
|
||||
SetDex(200);
|
||||
SetInt(100);
|
||||
|
||||
SetHits(Core.SE ? 140 : 70);
|
||||
SetStam(250);
|
||||
SetMana(0);
|
||||
|
||||
SetDamage(14, 17);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 0);
|
||||
SetDamageType(ResistanceType.Energy, 100);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 60, 70);
|
||||
SetResistance(ResistanceType.Fire, 40, 50);
|
||||
SetResistance(ResistanceType.Cold, 40, 50);
|
||||
SetResistance(ResistanceType.Poison, 40, 50);
|
||||
SetResistance(ResistanceType.Energy, 90, 100);
|
||||
|
||||
SetSkill(SkillName.MagicResist, 99.9);
|
||||
SetSkill(SkillName.Tactics, 100.0);
|
||||
SetSkill(SkillName.Wrestling, 120.0);
|
||||
|
||||
Fame = 0;
|
||||
Karma = 0;
|
||||
|
||||
VirtualArmor = 40;
|
||||
ControlSlots = Core.SE ? 2 : 1;
|
||||
}
|
||||
|
||||
|
||||
public EnergyVortex(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "an energy vortex corpse";
|
||||
public override bool DeleteCorpseOnDeath => Summoned;
|
||||
public override bool AlwaysMurderer => true; // Or Llama vortices will appear gray.
|
||||
|
||||
public override double DispelDifficulty => 80.0;
|
||||
public override double DispelFocus => 20.0;
|
||||
|
||||
public override string DefaultName => "an energy vortex";
|
||||
|
||||
public override bool BleedImmune => true;
|
||||
public override Poison PoisonImmune => Poison.Lethal;
|
||||
|
||||
public override double GetFightModeRanking(Mobile m, FightMode acqType, bool bPlayerOnly)
|
||||
{
|
||||
return (m.Int + m.Skills.Magery.Value) / Math.Max(GetDistanceToSqrt(m), 1.0);
|
||||
}
|
||||
|
||||
public override int GetAngerSound()
|
||||
{
|
||||
return 0x15;
|
||||
}
|
||||
|
||||
public override int GetAttackSound()
|
||||
{
|
||||
return 0x28;
|
||||
}
|
||||
|
||||
public override void OnThink()
|
||||
{
|
||||
if (Core.SE && Summoned)
|
||||
{
|
||||
IPooledEnumerable<Mobile> eable = GetMobilesInRange(5);
|
||||
List<Mobile> spiritsOrVortexes = eable
|
||||
.Where(m => (m is EnergyVortex || m is BladeSpirits) && ((BaseCreature)m).Summoned).ToList();
|
||||
|
||||
eable.Free();
|
||||
|
||||
while (spiritsOrVortexes.Count > 6)
|
||||
{
|
||||
int index = Utility.Random(spiritsOrVortexes.Count);
|
||||
Dispel(spiritsOrVortexes[index]);
|
||||
spiritsOrVortexes.RemoveAt(index);
|
||||
}
|
||||
}
|
||||
|
||||
base.OnThink();
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
if (BaseSoundID == 263)
|
||||
BaseSoundID = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
60
Projects/Scripts/Mobiles/Monsters/Misc/Melee/FrostOoze.cs
Normal file
60
Projects/Scripts/Mobiles/Monsters/Misc/Melee/FrostOoze.cs
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
namespace Server.Mobiles
|
||||
{
|
||||
public class FrostOoze : BaseCreature
|
||||
{
|
||||
[Constructible]
|
||||
public FrostOoze() : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
Body = 94;
|
||||
BaseSoundID = 456;
|
||||
|
||||
SetStr(18, 30);
|
||||
SetDex(16, 21);
|
||||
SetInt(16, 20);
|
||||
|
||||
SetHits(13, 17);
|
||||
|
||||
SetDamage(3, 9);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 100);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 15, 20);
|
||||
SetResistance(ResistanceType.Cold, 40, 50);
|
||||
SetResistance(ResistanceType.Poison, 20, 30);
|
||||
SetResistance(ResistanceType.Energy, 10, 20);
|
||||
|
||||
SetSkill(SkillName.MagicResist, 5.1, 10.0);
|
||||
SetSkill(SkillName.Tactics, 19.3, 34.0);
|
||||
SetSkill(SkillName.Wrestling, 25.3, 40.0);
|
||||
|
||||
Fame = 450;
|
||||
Karma = -450;
|
||||
|
||||
VirtualArmor = 38;
|
||||
}
|
||||
|
||||
public FrostOoze(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "a frost ooze corpse";
|
||||
public override string DefaultName => "a frost ooze";
|
||||
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot(LootPack.Gems, Utility.RandomMinMax(1, 2));
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
223
Projects/Scripts/Mobiles/Monsters/Misc/Melee/Golem.cs
Normal file
223
Projects/Scripts/Mobiles/Monsters/Misc/Melee/Golem.cs
Normal file
|
|
@ -0,0 +1,223 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Golem : BaseCreature
|
||||
{
|
||||
private bool m_Stunning;
|
||||
|
||||
[Constructible]
|
||||
public Golem(bool summoned = false, double scalar = 1.0) :
|
||||
base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.4, 0.8)
|
||||
{
|
||||
Body = 752;
|
||||
|
||||
if (summoned)
|
||||
Hue = 2101;
|
||||
|
||||
SetStr((int)(251 * scalar), (int)(350 * scalar));
|
||||
SetDex((int)(76 * scalar), (int)(100 * scalar));
|
||||
SetInt((int)(101 * scalar), (int)(150 * scalar));
|
||||
|
||||
SetHits((int)(151 * scalar), (int)(210 * scalar));
|
||||
|
||||
SetDamage((int)(13 * scalar), (int)(24 * scalar));
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 100);
|
||||
|
||||
SetResistance(ResistanceType.Physical, (int)(35 * scalar), (int)(55 * scalar));
|
||||
|
||||
if (summoned)
|
||||
SetResistance(ResistanceType.Fire, (int)(50 * scalar), (int)(60 * scalar));
|
||||
else
|
||||
SetResistance(ResistanceType.Fire, (int)(100 * scalar));
|
||||
|
||||
SetResistance(ResistanceType.Cold, (int)(10 * scalar), (int)(30 * scalar));
|
||||
SetResistance(ResistanceType.Poison, (int)(10 * scalar), (int)(25 * scalar));
|
||||
SetResistance(ResistanceType.Energy, (int)(30 * scalar), (int)(40 * scalar));
|
||||
|
||||
SetSkill(SkillName.MagicResist, 150.1 * scalar, 190.0 * scalar);
|
||||
SetSkill(SkillName.Tactics, 60.1 * scalar, 100.0 * scalar);
|
||||
SetSkill(SkillName.Wrestling, 60.1 * scalar, 100.0 * scalar);
|
||||
|
||||
if (summoned)
|
||||
{
|
||||
Fame = 10;
|
||||
Karma = 10;
|
||||
}
|
||||
else
|
||||
{
|
||||
Fame = 3500;
|
||||
Karma = -3500;
|
||||
}
|
||||
|
||||
if (!summoned)
|
||||
{
|
||||
PackItem(new IronIngot(Utility.RandomMinMax(13, 21)));
|
||||
|
||||
if (0.1 > Utility.RandomDouble())
|
||||
PackItem(new PowerCrystal());
|
||||
|
||||
if (0.15 > Utility.RandomDouble())
|
||||
PackItem(new ClockworkAssembly());
|
||||
|
||||
if (0.2 > Utility.RandomDouble())
|
||||
PackItem(new ArcaneGem());
|
||||
|
||||
if (0.25 > Utility.RandomDouble())
|
||||
PackItem(new Gears());
|
||||
}
|
||||
|
||||
ControlSlots = 3;
|
||||
}
|
||||
|
||||
public Golem(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "a golem corpse";
|
||||
|
||||
public override bool IsScaredOfScaryThings => false;
|
||||
public override bool IsScaryToPets => true;
|
||||
|
||||
public override bool IsBondable => false;
|
||||
|
||||
public override FoodType FavoriteFood => FoodType.None;
|
||||
|
||||
public override bool CanBeDistracted => false;
|
||||
|
||||
public override string DefaultName => "a golem";
|
||||
|
||||
public override bool DeleteOnRelease => true;
|
||||
|
||||
public override bool AutoDispel => !Controlled;
|
||||
public override bool BleedImmune => true;
|
||||
|
||||
public override bool BardImmune => !Core.AOS || Controlled;
|
||||
public override Poison PoisonImmune => Poison.Lethal;
|
||||
|
||||
public override void OnDeath(Container c)
|
||||
{
|
||||
base.OnDeath(c);
|
||||
|
||||
if (0.05 > Utility.RandomDouble())
|
||||
{
|
||||
if (!IsParagon)
|
||||
{
|
||||
if (0.75 > Utility.RandomDouble())
|
||||
c.DropItem(DawnsMusicGear.RandomCommon);
|
||||
else
|
||||
c.DropItem(DawnsMusicGear.RandomUncommon);
|
||||
}
|
||||
else
|
||||
{
|
||||
c.DropItem(DawnsMusicGear.RandomRare);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override int GetAngerSound()
|
||||
{
|
||||
return 541;
|
||||
}
|
||||
|
||||
public override int GetIdleSound()
|
||||
{
|
||||
if (!Controlled)
|
||||
return 542;
|
||||
|
||||
return base.GetIdleSound();
|
||||
}
|
||||
|
||||
public override int GetDeathSound()
|
||||
{
|
||||
if (!Controlled)
|
||||
return 545;
|
||||
|
||||
return base.GetDeathSound();
|
||||
}
|
||||
|
||||
public override int GetAttackSound()
|
||||
{
|
||||
return 562;
|
||||
}
|
||||
|
||||
public override int GetHurtSound()
|
||||
{
|
||||
if (Controlled)
|
||||
return 320;
|
||||
|
||||
return base.GetHurtSound();
|
||||
}
|
||||
|
||||
public override void OnGaveMeleeAttack(Mobile defender)
|
||||
{
|
||||
base.OnGaveMeleeAttack(defender);
|
||||
|
||||
if (!m_Stunning && 0.3 > Utility.RandomDouble())
|
||||
{
|
||||
m_Stunning = true;
|
||||
|
||||
defender.Animate(21, 6, 1, true, false, 0);
|
||||
PlaySound(0xEE);
|
||||
defender.LocalOverheadMessage(MessageType.Regular, 0x3B2, false,
|
||||
"You have been stunned by a colossal blow!");
|
||||
|
||||
if (Weapon is BaseWeapon weapon)
|
||||
weapon.OnHit(this, defender);
|
||||
|
||||
if (defender.Alive)
|
||||
{
|
||||
defender.Frozen = true;
|
||||
Timer.DelayCall(TimeSpan.FromSeconds(5.0), Recover_Callback, defender);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void Recover_Callback(Mobile defender)
|
||||
{
|
||||
defender.Frozen = false;
|
||||
defender.Combatant = null;
|
||||
defender.LocalOverheadMessage(MessageType.Regular, 0x3B2, false, "You recover your senses.");
|
||||
m_Stunning = false;
|
||||
}
|
||||
|
||||
public override void OnDamage(int amount, Mobile from, bool willKill)
|
||||
{
|
||||
if (Controlled || Summoned)
|
||||
{
|
||||
Mobile master = ControlMaster ?? SummonMaster;
|
||||
|
||||
if (master?.Player == true && master.Map == Map && master.InRange(Location, 20))
|
||||
{
|
||||
if (master.Mana >= amount)
|
||||
{
|
||||
master.Mana -= amount;
|
||||
}
|
||||
else
|
||||
{
|
||||
amount -= master.Mana;
|
||||
master.Mana = 0;
|
||||
master.Damage(amount);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
base.OnDamage(amount, from, willKill);
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
248
Projects/Scripts/Mobiles/Monsters/Misc/Melee/PlagueBeast.cs
Normal file
248
Projects/Scripts/Mobiles/Monsters/Misc/Melee/PlagueBeast.cs
Normal file
|
|
@ -0,0 +1,248 @@
|
|||
using System;
|
||||
using Server.Engines.Plants;
|
||||
using Server.Items;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class PlagueBeast : BaseCreature, IDevourer
|
||||
{
|
||||
private int m_DevourGoal;
|
||||
|
||||
[Constructible]
|
||||
public PlagueBeast() : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
Body = 775;
|
||||
|
||||
SetStr(302, 500);
|
||||
SetDex(80);
|
||||
SetInt(16, 20);
|
||||
|
||||
SetHits(318, 404);
|
||||
|
||||
SetDamage(20, 24);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 60);
|
||||
SetDamageType(ResistanceType.Poison, 40);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 45, 55);
|
||||
SetResistance(ResistanceType.Fire, 40, 50);
|
||||
SetResistance(ResistanceType.Cold, 25, 35);
|
||||
SetResistance(ResistanceType.Poison, 65, 75);
|
||||
SetResistance(ResistanceType.Energy, 25, 35);
|
||||
|
||||
SetSkill(SkillName.MagicResist, 35.0);
|
||||
SetSkill(SkillName.Tactics, 100.0);
|
||||
SetSkill(SkillName.Wrestling, 100.0);
|
||||
|
||||
Fame = 13000;
|
||||
Karma = -13000;
|
||||
|
||||
VirtualArmor = 30;
|
||||
PackArmor(1, 5);
|
||||
if (Utility.RandomDouble() < 0.80)
|
||||
PackItem(new PlagueBeastGland());
|
||||
|
||||
if (Core.ML && Utility.RandomDouble() < 0.33)
|
||||
PackItem(Seed.RandomPeculiarSeed(4));
|
||||
|
||||
TotalDevoured = 0;
|
||||
m_DevourGoal = Utility.RandomMinMax(15, 25); // How many corpses must be devoured before a metal chest is awarded
|
||||
}
|
||||
|
||||
public PlagueBeast(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "a plague beast corpse";
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public int TotalDevoured{ get; set; }
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public int DevourGoal
|
||||
{
|
||||
get => IsParagon ? m_DevourGoal + 25 : m_DevourGoal;
|
||||
set => m_DevourGoal = value;
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public bool HasMetalChest{ get; private set; }
|
||||
|
||||
public override string DefaultName => "a plague beast";
|
||||
|
||||
public override bool AutoDispel => true;
|
||||
public override Poison PoisonImmune => Poison.Lethal;
|
||||
|
||||
#region IDevourer Members
|
||||
|
||||
public bool Devour(Corpse corpse)
|
||||
{
|
||||
if (corpse?.Owner == null) // sorry we can't devour because the corpse's owner is null
|
||||
return false;
|
||||
|
||||
if (corpse.Owner.Body.IsHuman)
|
||||
corpse.TurnToBones(); // Not bones yet, and we are a human body therefore we turn to bones.
|
||||
|
||||
IncreaseHits((int)Math.Ceiling(corpse.Owner.HitsMax * 0.75));
|
||||
TotalDevoured++;
|
||||
|
||||
PublicOverheadMessage(MessageType.Emote, 0x3B2,
|
||||
1053033); // * The plague beast absorbs the fleshy remains of the corpse *
|
||||
|
||||
if (!HasMetalChest && TotalDevoured >= DevourGoal)
|
||||
{
|
||||
PackItem(new MetalChest());
|
||||
HasMetalChest = true;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot(LootPack.FilthyRich);
|
||||
AddLoot(LootPack.Gems, Utility.Random(1, 3));
|
||||
// TODO: dungeon chest, healthy gland
|
||||
}
|
||||
|
||||
public override void OnGaveMeleeAttack(Mobile defender)
|
||||
{
|
||||
base.OnGaveMeleeAttack(defender);
|
||||
|
||||
defender.ApplyPoison(this, IsParagon ? Poison.Lethal : Poison.Deadly);
|
||||
defender.FixedParticles(0x374A, 10, 15, 5021, EffectLayer.Waist);
|
||||
defender.PlaySound(0x1CB);
|
||||
}
|
||||
|
||||
public override void OnDamagedBySpell(Mobile caster)
|
||||
{
|
||||
if (Map != null && caster != this && 0.25 > Utility.RandomDouble())
|
||||
{
|
||||
BaseCreature spawn = new PlagueSpawn(this);
|
||||
|
||||
spawn.Team = Team;
|
||||
spawn.MoveToWorld(Location, Map);
|
||||
spawn.Combatant = caster;
|
||||
|
||||
Say(1053034); // * The plague beast creates another beast from its flesh! *
|
||||
}
|
||||
|
||||
base.OnDamagedBySpell(caster);
|
||||
}
|
||||
|
||||
public override void OnGotMeleeAttack(Mobile attacker)
|
||||
{
|
||||
if (Map != null && attacker != this && 0.25 > Utility.RandomDouble())
|
||||
{
|
||||
BaseCreature spawn = new PlagueSpawn(this);
|
||||
|
||||
spawn.Team = Team;
|
||||
spawn.MoveToWorld(Location, Map);
|
||||
spawn.Combatant = attacker;
|
||||
|
||||
Say(1053034); // * The plague beast creates another beast from its flesh! *
|
||||
}
|
||||
|
||||
base.OnGotMeleeAttack(attacker);
|
||||
}
|
||||
|
||||
public override int GetIdleSound()
|
||||
{
|
||||
return 0x1BF;
|
||||
}
|
||||
|
||||
public override int GetAttackSound()
|
||||
{
|
||||
return 0x1C0;
|
||||
}
|
||||
|
||||
public override int GetHurtSound()
|
||||
{
|
||||
return 0x1C1;
|
||||
}
|
||||
|
||||
public override int GetDeathSound()
|
||||
{
|
||||
return 0x1C2;
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write(1);
|
||||
|
||||
writer.Write(HasMetalChest);
|
||||
writer.Write(TotalDevoured);
|
||||
writer.Write(m_DevourGoal);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch (version)
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
HasMetalChest = reader.ReadBool();
|
||||
TotalDevoured = reader.ReadInt();
|
||||
m_DevourGoal = reader.ReadInt();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnThink()
|
||||
{
|
||||
base.OnThink();
|
||||
|
||||
// Check to see if we need to devour any corpses
|
||||
IPooledEnumerable<Corpse> eable = GetItemsInRange<Corpse>(3); // Get all corpses in range
|
||||
|
||||
foreach (Corpse item in eable)
|
||||
// Ensure that the corpse was killed by us
|
||||
if (item.Killer == this && item.Owner != null && !item.DevourCorpse() && !item.Devoured)
|
||||
PublicOverheadMessage(MessageType.Emote, 0x3B2,
|
||||
1053032); // * The plague beast attempts to absorb the remains, but cannot! *
|
||||
|
||||
eable.Free();
|
||||
}
|
||||
|
||||
private void IncreaseHits(int hp)
|
||||
{
|
||||
int maxhits = 2000;
|
||||
|
||||
if (IsParagon)
|
||||
maxhits = (int)(maxhits * Paragon.HitsBuff);
|
||||
|
||||
if (hp < 1000 && !Core.AOS)
|
||||
hp = hp * 100 / 60;
|
||||
|
||||
if (HitsMaxSeed >= maxhits)
|
||||
{
|
||||
HitsMaxSeed = maxhits;
|
||||
|
||||
int newHits =
|
||||
Hits + hp + Utility.RandomMinMax(10,
|
||||
20); // increase the hp until it hits if it goes over it'll max at 2000
|
||||
|
||||
Hits = Math.Min(maxhits, newHits);
|
||||
// Also provide heal for each devour on top of the hp increase
|
||||
}
|
||||
else
|
||||
{
|
||||
int min = hp / 2 + 10;
|
||||
int max = hp + 20;
|
||||
int hpToIncrease = Utility.RandomMinMax(min, max);
|
||||
|
||||
HitsMaxSeed += hpToIncrease;
|
||||
Hits += hpToIncrease;
|
||||
// Also provide heal for each devour
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
353
Projects/Scripts/Mobiles/Monsters/Misc/Melee/PlagueBeastLord.cs
Normal file
353
Projects/Scripts/Mobiles/Monsters/Misc/Melee/PlagueBeastLord.cs
Normal file
|
|
@ -0,0 +1,353 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class PlagueBeastLord : BaseCreature, ICarvable, IScissorable
|
||||
{
|
||||
private DecayTimer m_Timer;
|
||||
|
||||
[Constructible]
|
||||
public PlagueBeastLord() : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
Body = 775;
|
||||
BaseSoundID = 679;
|
||||
SpeechHue = 0x3B2;
|
||||
|
||||
SetStr(500);
|
||||
SetDex(100);
|
||||
SetInt(30);
|
||||
|
||||
SetHits(1800);
|
||||
|
||||
SetDamage(20, 25);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 50);
|
||||
SetDamageType(ResistanceType.Fire, 25);
|
||||
SetDamageType(ResistanceType.Poison, 25);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 45, 55);
|
||||
SetResistance(ResistanceType.Fire, 40, 50);
|
||||
SetResistance(ResistanceType.Cold, 25, 35);
|
||||
SetResistance(ResistanceType.Poison, 75, 85);
|
||||
SetResistance(ResistanceType.Energy, 25, 35);
|
||||
|
||||
SetSkill(SkillName.Tactics, 100);
|
||||
SetSkill(SkillName.Wrestling, 100);
|
||||
|
||||
Fame = 2000;
|
||||
Karma = -2000;
|
||||
|
||||
VirtualArmor = 50;
|
||||
}
|
||||
|
||||
public PlagueBeastLord(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "a plague beast lord corpse";
|
||||
public override Poison PoisonImmune => Poison.Lethal;
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public Mobile OpenedBy{ get; set; }
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public bool IsBleeding
|
||||
{
|
||||
get
|
||||
{
|
||||
Container pack = Backpack;
|
||||
|
||||
if (pack != null)
|
||||
for (int i = 0; i < pack.Items.Count; i++)
|
||||
if (pack.Items[i] is PlagueBeastBlood blood && !blood.Patched)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public override string DefaultName => "a plague beast lord";
|
||||
|
||||
public virtual void Carve(Mobile from, Item item)
|
||||
{
|
||||
if (OpenedBy == null && IsAccessibleTo(from))
|
||||
{
|
||||
OpenedBy = from;
|
||||
|
||||
if (m_Timer == null)
|
||||
m_Timer = new DecayTimer(this);
|
||||
|
||||
if (!m_Timer.Running)
|
||||
m_Timer.Start();
|
||||
|
||||
m_Timer.StartDissolving();
|
||||
|
||||
PlagueBeastBackpack pack = new PlagueBeastBackpack();
|
||||
AddItem(pack);
|
||||
pack.Initialize();
|
||||
|
||||
foreach (NetState state in GetClientsInRange(12))
|
||||
{
|
||||
Mobile m = state.Mobile;
|
||||
|
||||
if (m?.Player == true && m != from)
|
||||
PrivateOverheadMessage(MessageType.Regular, 0x3B2, 1071919, from.Name,
|
||||
m.NetState); // * ~1_VAL~ slices through the plague beast's amorphous tissue *
|
||||
}
|
||||
|
||||
from.LocalOverheadMessage(MessageType.Regular, 0x21,
|
||||
1071904); // * You slice through the plague beast's amorphous tissue *
|
||||
Timer.DelayCall(TimeSpan.Zero, pack.Open, from);
|
||||
}
|
||||
}
|
||||
|
||||
public virtual bool Scissor(Mobile from, Scissors scissors)
|
||||
{
|
||||
if (IsAccessibleTo(from))
|
||||
scissors.PublicOverheadMessage(MessageType.Regular, 0x3B2,
|
||||
1071918); // You can't cut through the plague beast's amorphous skin with scissors!
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (IsAccessibleTo(from))
|
||||
{
|
||||
if (OpenedBy != null && Backpack != null)
|
||||
Backpack.DisplayTo(from);
|
||||
else
|
||||
PrivateOverheadMessage(MessageType.Regular, 0x3B2, 1071917,
|
||||
from.NetState); // * You attempt to tear open the amorphous flesh, but it resists *
|
||||
}
|
||||
}
|
||||
|
||||
public override bool OnDragDrop(Mobile from, Item dropped)
|
||||
{
|
||||
if (IsAccessibleTo(from) && (dropped is PlagueBeastInnard || dropped is PlagueBeastGland))
|
||||
return base.OnDragDrop(from, dropped);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void OnDeath(Container c)
|
||||
{
|
||||
base.OnDeath(c);
|
||||
|
||||
for (int i = c.Items.Count - 1; i >= 0; i--)
|
||||
c.Items[i].Delete();
|
||||
}
|
||||
|
||||
public override void OnDelete()
|
||||
{
|
||||
if (OpenedBy?.Holding is PlagueBeastInnard)
|
||||
OpenedBy.Holding.Delete();
|
||||
|
||||
if (Backpack != null)
|
||||
{
|
||||
for (int i = Backpack.Items.Count - 1; i >= 0; i--)
|
||||
Backpack.Items[i].Delete();
|
||||
|
||||
Backpack.Delete();
|
||||
}
|
||||
|
||||
base.OnDelete();
|
||||
}
|
||||
|
||||
public override void OnMovement(Mobile m, Point3D oldLocation)
|
||||
{
|
||||
base.OnMovement(m, oldLocation);
|
||||
|
||||
if (Backpack != null && IsAccessibleTo(m) && m.InRange(oldLocation, 3) && !m.InRange(this, 3))
|
||||
Backpack.SendRemovePacket();
|
||||
}
|
||||
|
||||
public override bool CheckNonlocalLift(Mobile from, Item item)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool CheckNonlocalDrop(Mobile from, Item item, Item target)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool IsSnoop(Mobile from)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public override int GetIdleSound()
|
||||
{
|
||||
return 0x1BF;
|
||||
}
|
||||
|
||||
public override int GetAttackSound()
|
||||
{
|
||||
return 0x1C0;
|
||||
}
|
||||
|
||||
public override int GetHurtSound()
|
||||
{
|
||||
return 0x1C1;
|
||||
}
|
||||
|
||||
public override int GetDeathSound()
|
||||
{
|
||||
return 0x1C2;
|
||||
}
|
||||
|
||||
public virtual void OnParalyzed(Mobile from)
|
||||
{
|
||||
FightMode = FightMode.None;
|
||||
Frozen = true;
|
||||
Blessed = true;
|
||||
Combatant = null;
|
||||
Hue = 0x480;
|
||||
from.Combatant = null;
|
||||
from.Warmode = false;
|
||||
|
||||
m_Timer = new DecayTimer(this);
|
||||
m_Timer.Start();
|
||||
|
||||
Timer.DelayCall(TimeSpan.Zero, BroadcastMessage);
|
||||
}
|
||||
|
||||
private void BroadcastMessage()
|
||||
{
|
||||
PublicOverheadMessage(MessageType.Regular, 0x3B2,
|
||||
1071920); // * The plague beast's amorphous flesh hardens and becomes immobilized *
|
||||
}
|
||||
|
||||
public virtual bool IsAccessibleTo(Mobile check)
|
||||
{
|
||||
if (check.AccessLevel >= AccessLevel.GameMaster)
|
||||
return true;
|
||||
|
||||
if (!InRange(check, 2))
|
||||
PrivateOverheadMessage(MessageType.Label, 0x3B2, 500446, check.NetState); // That is too far away.
|
||||
else if (OpenedBy != null && OpenedBy != check)
|
||||
PrivateOverheadMessage(MessageType.Label, 0x3B2, 500365,
|
||||
check.NetState); // That is being used by someone else
|
||||
else if (Frozen)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public void Unfreeze()
|
||||
{
|
||||
FightMode = FightMode.Closest;
|
||||
Frozen = false;
|
||||
Blessed = false;
|
||||
|
||||
if (OpenedBy == null)
|
||||
Hue = 0;
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.WriteEncodedInt(0); // version
|
||||
|
||||
writer.Write(OpenedBy);
|
||||
|
||||
if (m_Timer != null)
|
||||
{
|
||||
writer.Write(true);
|
||||
writer.Write(m_Timer.Count);
|
||||
writer.Write(m_Timer.Deadline);
|
||||
}
|
||||
else
|
||||
{
|
||||
writer.Write(false);
|
||||
}
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
|
||||
OpenedBy = reader.ReadMobile();
|
||||
|
||||
if (reader.ReadBool())
|
||||
{
|
||||
int count = reader.ReadInt();
|
||||
int deadline = reader.ReadInt();
|
||||
|
||||
m_Timer = new DecayTimer(this, count, deadline);
|
||||
m_Timer.Start();
|
||||
}
|
||||
|
||||
if (FightMode == FightMode.None)
|
||||
Frozen = true;
|
||||
}
|
||||
|
||||
private class DecayTimer : Timer
|
||||
{
|
||||
private PlagueBeastLord m_Lord;
|
||||
|
||||
public DecayTimer(PlagueBeastLord lord, int count = 0, int deadline = 120) : base(TimeSpan.Zero, TimeSpan.FromSeconds(1))
|
||||
{
|
||||
m_Lord = lord;
|
||||
Count = count;
|
||||
Deadline = deadline;
|
||||
}
|
||||
|
||||
public int Count{ get; private set; }
|
||||
|
||||
public int Deadline{ get; private set; }
|
||||
|
||||
protected override void OnTick()
|
||||
{
|
||||
if (m_Lord?.Deleted != false)
|
||||
{
|
||||
Stop();
|
||||
return;
|
||||
}
|
||||
|
||||
if (Count + 15 == Deadline)
|
||||
{
|
||||
if (m_Lord.OpenedBy != null)
|
||||
m_Lord.PublicOverheadMessage(MessageType.Regular, 0x3B2,
|
||||
1071921); // * The plague beast begins to bubble and dissolve! *
|
||||
|
||||
m_Lord.PlaySound(0x103);
|
||||
}
|
||||
else if (Count + 10 == Deadline)
|
||||
{
|
||||
m_Lord.PlaySound(0x21);
|
||||
}
|
||||
else if (Count + 5 == Deadline)
|
||||
{
|
||||
m_Lord.PlaySound(0x1C2);
|
||||
}
|
||||
else if (Count == Deadline)
|
||||
{
|
||||
m_Lord.Unfreeze();
|
||||
|
||||
if (m_Lord.OpenedBy != null)
|
||||
m_Lord.Kill();
|
||||
|
||||
Stop();
|
||||
}
|
||||
else if (Count % 15 == 0)
|
||||
{
|
||||
m_Lord.PlaySound(0x1BF);
|
||||
}
|
||||
|
||||
Count++;
|
||||
}
|
||||
|
||||
public void StartDissolving()
|
||||
{
|
||||
Deadline = Math.Min(Count + 60, Deadline);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
131
Projects/Scripts/Mobiles/Monsters/Misc/Melee/PlagueSpawn.cs
Normal file
131
Projects/Scripts/Mobiles/Monsters/Misc/Melee/PlagueSpawn.cs
Normal file
|
|
@ -0,0 +1,131 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Server.ContextMenus;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class PlagueSpawn : BaseCreature
|
||||
{
|
||||
public PlagueSpawn(Mobile owner = null) :
|
||||
base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
Owner = owner;
|
||||
ExpireTime = DateTime.UtcNow + TimeSpan.FromMinutes(1.0);
|
||||
|
||||
Hue = Utility.Random(0x11, 15);
|
||||
|
||||
switch (Utility.Random(12))
|
||||
{
|
||||
case 0: // earth elemental
|
||||
Body = 14;
|
||||
BaseSoundID = 268;
|
||||
break;
|
||||
case 1: // headless one
|
||||
Body = 31;
|
||||
BaseSoundID = 0x39D;
|
||||
break;
|
||||
case 2: // person
|
||||
Body = Utility.RandomList(400, 401);
|
||||
break;
|
||||
case 3: // gorilla
|
||||
Body = 0x1D;
|
||||
BaseSoundID = 0x9E;
|
||||
break;
|
||||
case 4: // serpent
|
||||
Body = 0x15;
|
||||
BaseSoundID = 0xDB;
|
||||
break;
|
||||
default:
|
||||
case 5: // slime
|
||||
Body = 51;
|
||||
BaseSoundID = 456;
|
||||
break;
|
||||
}
|
||||
|
||||
SetStr(201, 300);
|
||||
SetDex(80);
|
||||
SetInt(16, 20);
|
||||
|
||||
SetHits(121, 180);
|
||||
|
||||
SetDamage(11, 17);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 100);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 35, 45);
|
||||
SetResistance(ResistanceType.Fire, 30, 40);
|
||||
SetResistance(ResistanceType.Cold, 25, 35);
|
||||
SetResistance(ResistanceType.Poison, 65, 75);
|
||||
SetResistance(ResistanceType.Energy, 25, 35);
|
||||
|
||||
SetSkill(SkillName.MagicResist, 25.0);
|
||||
SetSkill(SkillName.Tactics, 25.0);
|
||||
SetSkill(SkillName.Wrestling, 50.0);
|
||||
|
||||
Fame = 1000;
|
||||
Karma = -1000;
|
||||
|
||||
VirtualArmor = 20;
|
||||
}
|
||||
|
||||
public PlagueSpawn(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "a plague spawn corpse";
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public Mobile Owner{ get; set; }
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public DateTime ExpireTime{ get; set; }
|
||||
|
||||
public override bool AlwaysMurderer => true;
|
||||
|
||||
public override string DefaultName => "a plague spawn";
|
||||
|
||||
public override void DisplayPaperdollTo(Mobile to)
|
||||
{
|
||||
}
|
||||
|
||||
public override void GetContextMenuEntries(Mobile from, List<ContextMenuEntry> list)
|
||||
{
|
||||
base.GetContextMenuEntries(from, list);
|
||||
|
||||
for (int i = 0; i < list.Count; ++i)
|
||||
if (list[i] is PaperdollEntry)
|
||||
list.RemoveAt(i--);
|
||||
}
|
||||
|
||||
public override void OnThink()
|
||||
{
|
||||
if (Owner != null && (DateTime.UtcNow >= ExpireTime || Owner.Deleted || Map != Owner.Map || !InRange(Owner, 16)))
|
||||
{
|
||||
PlaySound(GetIdleSound());
|
||||
Delete();
|
||||
}
|
||||
else
|
||||
{
|
||||
base.OnThink();
|
||||
}
|
||||
}
|
||||
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot(LootPack.Poor);
|
||||
AddLoot(LootPack.Gems);
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
112
Projects/Scripts/Mobiles/Monsters/Misc/Melee/SandVortex.cs
Normal file
112
Projects/Scripts/Mobiles/Monsters/Misc/Melee/SandVortex.cs
Normal file
|
|
@ -0,0 +1,112 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class SandVortex : BaseCreature
|
||||
{
|
||||
private DateTime m_NextAttack;
|
||||
|
||||
[Constructible]
|
||||
public SandVortex() : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
Body = 790;
|
||||
BaseSoundID = 263;
|
||||
|
||||
SetStr(96, 120);
|
||||
SetDex(171, 195);
|
||||
SetInt(76, 100);
|
||||
|
||||
SetHits(51, 62);
|
||||
|
||||
SetDamage(3, 16);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 90);
|
||||
SetDamageType(ResistanceType.Fire, 10);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 80, 90);
|
||||
SetResistance(ResistanceType.Fire, 60, 70);
|
||||
SetResistance(ResistanceType.Cold, 60, 70);
|
||||
SetResistance(ResistanceType.Poison, 60, 70);
|
||||
SetResistance(ResistanceType.Energy, 60, 70);
|
||||
|
||||
SetSkill(SkillName.MagicResist, 150.0);
|
||||
SetSkill(SkillName.Tactics, 70.0);
|
||||
SetSkill(SkillName.Wrestling, 80.0);
|
||||
|
||||
Fame = 4500;
|
||||
Karma = -4500;
|
||||
|
||||
VirtualArmor = 28;
|
||||
PackItem(new Bone());
|
||||
}
|
||||
|
||||
public SandVortex(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "a sand vortex corpse";
|
||||
public override string DefaultName => "a sand vortex";
|
||||
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot(LootPack.Meager, 2);
|
||||
}
|
||||
|
||||
public override void OnActionCombat()
|
||||
{
|
||||
Mobile combatant = Combatant;
|
||||
|
||||
if (combatant?.Deleted != false || combatant.Map != Map || !InRange(combatant, 12) ||
|
||||
!CanBeHarmful(combatant) || !InLOS(combatant))
|
||||
return;
|
||||
|
||||
if (DateTime.UtcNow >= m_NextAttack)
|
||||
{
|
||||
SandAttack(combatant);
|
||||
m_NextAttack = DateTime.UtcNow + TimeSpan.FromSeconds(10.0 + 10.0 * Utility.RandomDouble());
|
||||
}
|
||||
}
|
||||
|
||||
public void SandAttack(Mobile m)
|
||||
{
|
||||
DoHarmful(m);
|
||||
|
||||
m.FixedParticles(0x36B0, 10, 25, 9540, 2413, 0, EffectLayer.Waist);
|
||||
|
||||
new InternalTimer(m, this).Start();
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
|
||||
private class InternalTimer : Timer
|
||||
{
|
||||
private Mobile m_Mobile, m_From;
|
||||
|
||||
public InternalTimer(Mobile m, Mobile from) : base(TimeSpan.FromSeconds(1.0))
|
||||
{
|
||||
m_Mobile = m;
|
||||
m_From = from;
|
||||
Priority = TimerPriority.TwoFiftyMS;
|
||||
}
|
||||
|
||||
protected override void OnTick()
|
||||
{
|
||||
m_Mobile.PlaySound(0x4CF);
|
||||
AOS.Damage(m_Mobile, m_From, Utility.RandomMinMax(1, 40), 90, 10, 0, 0, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
72
Projects/Scripts/Mobiles/Monsters/Misc/Melee/Slime.cs
Normal file
72
Projects/Scripts/Mobiles/Monsters/Misc/Melee/Slime.cs
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
namespace Server.Mobiles
|
||||
{
|
||||
public class Slime : BaseCreature
|
||||
{
|
||||
[Constructible]
|
||||
public Slime() : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
Body = 51;
|
||||
BaseSoundID = 456;
|
||||
|
||||
Hue = Utility.RandomSlimeHue();
|
||||
|
||||
SetStr(22, 34);
|
||||
SetDex(16, 21);
|
||||
SetInt(16, 20);
|
||||
|
||||
SetHits(15, 19);
|
||||
|
||||
SetDamage(1, 5);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 100);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 5, 10);
|
||||
SetResistance(ResistanceType.Poison, 10, 20);
|
||||
|
||||
SetSkill(SkillName.Poisoning, 30.1, 50.0);
|
||||
SetSkill(SkillName.MagicResist, 15.1, 20.0);
|
||||
SetSkill(SkillName.Tactics, 19.3, 34.0);
|
||||
SetSkill(SkillName.Wrestling, 19.3, 34.0);
|
||||
|
||||
Fame = 300;
|
||||
Karma = -300;
|
||||
|
||||
VirtualArmor = 8;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = 23.1;
|
||||
}
|
||||
|
||||
public Slime(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string CorpseName => "a slimey corpse";
|
||||
public override string DefaultName => "a slime";
|
||||
|
||||
public override Poison PoisonImmune => Poison.Lesser;
|
||||
public override Poison HitPoison => Poison.Lesser;
|
||||
|
||||
public override FoodType FavoriteFood => FoodType.Meat | FoodType.Fish | FoodType.FruitsAndVegies |
|
||||
FoodType.GrainsAndHay | FoodType.Eggs;
|
||||
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot(LootPack.Poor);
|
||||
AddLoot(LootPack.Gems);
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue