Overwrite

Complete Overwrite of the Folder with the free shard. ServUO 57.3 has been added.
This commit is contained in:
Unstable Kitsune
2023-11-28 23:20:26 -05:00
parent 3cd54811de
commit b918192e4e
11608 changed files with 2644205 additions and 47 deletions

View File

@@ -0,0 +1,126 @@
using System;
using Server.Items;
namespace Server.Mobiles
{
[CorpseName("an abyssmal horror corpse")]
public class AbysmalHorror : BaseCreature
{
[Constructable]
public AbysmalHorror()
: base(AIType.AI_Mage, FightMode.Closest, 10, 1, 0.2, 0.4)
{
Name = "an abyssmal horror";
Body = 312;
BaseSoundID = 0x451;
SetStr(401, 420);
SetDex(81, 90);
SetInt(401, 420);
SetHits(6000);
SetDamage(13, 17);
SetDamageType(ResistanceType.Physical, 50);
SetDamageType(ResistanceType.Poison, 50);
SetResistance(ResistanceType.Physical, 30, 35);
SetResistance(ResistanceType.Fire, 100);
SetResistance(ResistanceType.Cold, 50, 55);
SetResistance(ResistanceType.Poison, 60, 65);
SetResistance(ResistanceType.Energy, 77, 80);
SetSkill(SkillName.Wrestling, 84.1, 88.0);
SetSkill(SkillName.Tactics, 100.0);
SetSkill(SkillName.MagicResist, 117.6, 120.0);
SetSkill(SkillName.Poisoning, 70.0, 80.0);
SetSkill(SkillName.DetectHidden, 100.0);
SetSkill(SkillName.Magery, 112.6, 117.5);
SetSkill(SkillName.EvalInt, 200.0);
SetSkill(SkillName.Meditation, 200.0);
SetSkill(SkillName.Necromancy, 120.0);
SetSkill(SkillName.SpiritSpeak, 120.0);
SetSkill(SkillName.Focus, 10.0, 20.0);
Fame = 26000;
Karma = -26000;
VirtualArmor = 54;
SetWeaponAbility(WeaponAbility.MortalStrike);
SetWeaponAbility(WeaponAbility.WhirlwindAttack);
SetWeaponAbility(WeaponAbility.Block);
//Arcane Pyromancy
}
public AbysmalHorror(Serial serial)
: base(serial)
{
}
public override bool CanFlee { get { return false; } }
public override bool IgnoreYoungProtection
{
get
{
return Core.ML;
}
}
public override bool BardImmune
{
get
{
return !Core.SE;
}
}
public override bool Unprovokable
{
get
{
return Core.SE;
}
}
public override bool AreaPeaceImmune
{
get
{
return Core.SE;
}
}
public override Poison PoisonImmune
{
get
{
return Poison.Lethal;
}
}
public override int TreasureMapLevel
{
get
{
return 1;
}
}
public override void GenerateLoot()
{
AddLoot(LootPack.UltraRich, 2);
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}

View File

@@ -0,0 +1,111 @@
using System;
using Server.Items;
namespace Server.Mobiles
{
[CorpseName("an abyssal abomination corpse")]
public class AbyssalAbomination : BaseCreature
{
[Constructable]
public AbyssalAbomination()
: base(AIType.AI_NecroMage, FightMode.Closest, 10, 1, 0.2, 0.4)
{
Name = "an Abyssal Abomination";
Body = 312;
Hue = 769;
BaseSoundID = 0x451;
SetStr(401, 420);
SetDex(81, 90);
SetInt(401, 420);
SetHits(600, 750);
SetDamage(13, 17);
SetDamageType(ResistanceType.Physical, 50);
SetDamageType(ResistanceType.Poison, 50);
SetResistance(ResistanceType.Physical, 30, 35);
SetResistance(ResistanceType.Fire, 100);
SetResistance(ResistanceType.Cold, 50, 55);
SetResistance(ResistanceType.Poison, 60, 65);
SetResistance(ResistanceType.Energy, 77, 80);
SetSkill(SkillName.EvalInt, 200.0);
SetSkill(SkillName.Magery, 112.6, 117.5);
SetSkill(SkillName.SpiritSpeak, 200.0);
SetSkill(SkillName.Necromancy, 112.6, 117.5);
SetSkill(SkillName.Meditation, 200.0);
SetSkill(SkillName.MagicResist, 117.6, 120.0);
SetSkill(SkillName.Tactics, 100.0);
SetSkill(SkillName.Wrestling, 84.1, 88.0);
Fame = 26000;
Karma = -26000;
VirtualArmor = 54;
SetWeaponAbility(WeaponAbility.MortalStrike);
SetWeaponAbility(WeaponAbility.WhirlwindAttack);
}
public AbyssalAbomination(Serial serial)
: base(serial)
{
}
public override bool IgnoreYoungProtection
{
get
{
return Core.ML;
}
}
public override bool BardImmune
{
get
{
return !Core.SE;
}
}
public override bool Unprovokable
{
get
{
return Core.SE;
}
}
public override bool AreaPeaceImmune
{
get
{
return Core.SE;
}
}
public override Poison PoisonImmune
{
get
{
return Poison.Lethal;
}
}
public override void GenerateLoot()
{
AddLoot(LootPack.UltraRich, 2);
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}

View File

@@ -0,0 +1,118 @@
using System;
using Server.Items;
namespace Server.Mobiles
{
public interface IAcidCreature
{
}
[CorpseName("an acid elementals corpse")]
public class AcidElemental : BaseCreature, IAcidCreature
{
[Constructable]
public AcidElemental()
: base(AIType.AI_Mage, FightMode.Closest, 10, 1, 0.2, 0.4)
{
Name = "an acid elemental";
Body = 158;
BaseSoundID = 263;
SetStr(326, 355);
SetDex(66, 85);
SetInt(271, 295);
SetHits(196, 213);
SetDamage(9, 15);
SetDamageType(ResistanceType.Physical, 10);
SetDamageType(ResistanceType.Poison, 90);
SetResistance(ResistanceType.Physical, 60, 70);
SetResistance(ResistanceType.Fire, 20, 30);
SetResistance(ResistanceType.Cold, 20, 30);
SetResistance(ResistanceType.Poison, 100);
SetResistance(ResistanceType.Energy, 40, 50);
SetSkill(SkillName.Anatomy, 30.3, 60.0);
SetSkill(SkillName.EvalInt, 80.1, 95.0);
SetSkill(SkillName.Magery, 70.1, 85.0);
SetSkill(SkillName.Meditation, 0.0, 0.0);
SetSkill(SkillName.MagicResist, 60.1, 85.0);
SetSkill(SkillName.Tactics, 80.1, 90.0);
SetSkill(SkillName.Wrestling, 70.1, 90.0);
Fame = 10000;
Karma = -10000;
VirtualArmor = 70;
PackItem(new Nightshade(4));
}
public AcidElemental(Serial serial)
: base(serial)
{
}
public override bool BleedImmune
{
get
{
return true;
}
}
public override Poison PoisonImmune
{
get
{
return Poison.Lethal;
}
}
public override Poison HitPoison
{
get
{
return Poison.Lethal;
}
}
public override double HitPoisonChance
{
get
{
return 0.75;
}
}
public override int TreasureMapLevel
{
get
{
return 2;
}
}
public override void GenerateLoot()
{
this.AddLoot(LootPack.Rich);
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)1);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
switch (version)
{
case 0:
Body = 158;
break;
}
}
}
}

View File

@@ -0,0 +1,69 @@
using System;
using Server.Network;
using Server.Targeting;
namespace Server.Items
{
public class AcidPopper : Item
{
public override int LabelNumber { get { return 1095058; } } // Acid Popper
[Constructable]
public AcidPopper()
: this(1)
{
}
[Constructable]
public AcidPopper(int amount)
: base(0x2808)
{
Hue = 0x3F;
Stackable = true;
Amount = amount;
}
public AcidPopper(Serial serial)
: base(serial)
{
}
public override void OnDoubleClick(Mobile from)
{
if (!IsChildOf(from.Backpack))
from.SendLocalizedMessage(1042664); // You must have the object in your backpack to use it.
else
from.BeginTarget(1, false, TargetFlags.None, new TargetCallback(BurnWeb_Callback));
}
private void BurnWeb_Callback(Mobile from, object targeted)
{
SpiderWebbing web = targeted as SpiderWebbing;
if (web != null)
{
from.SendLocalizedMessage(1113240); // The acid popper bursts and burns away the webbing.
Effects.SendPacket(from.Location, from.Map, new TargetParticleEffect(this, 0x374A, 1, 10, 0x557, 0, 0x139D, 3, 0));
from.PlaySound(0x3E);
from.PlaySound(0x22F);
web.Delete();
Consume();
}
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}

View File

@@ -0,0 +1,103 @@
using System;
using Server.Items;
namespace Server.Mobiles
{
[CorpseName("an acid slug corpse")]
public class AcidSlug : BaseCreature, IAcidCreature
{
[Constructable]
public AcidSlug()
: base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
{
Name = "an acid slug";
Body = 51;
switch (Utility.Random(4))
{
case 0: Hue = 242; break;
case 1: Hue = 243; break;
case 2: Hue = 244; break;
case 3: Hue = 245; break;
}
SetStr(213, 294);
SetDex(80, 82);
SetInt(18, 22);
SetHits(333, 370);
SetDamage(21, 28);
SetDamageType(ResistanceType.Physical, 100);
SetResistance(ResistanceType.Physical, 10, 15);
SetResistance(ResistanceType.Fire, 0);
SetResistance(ResistanceType.Cold, 10, 15);
SetResistance(ResistanceType.Poison, 60, 70);
SetResistance(ResistanceType.Energy, 10, 15);
SetSkill(SkillName.MagicResist, 25.0);
SetSkill(SkillName.Tactics, 30.0, 50.0);
SetSkill(SkillName.Wrestling, 30.0, 80.0);
if (0.75 > Utility.RandomDouble())
PackItem(new AcidSac());
PackItem(new CongealedSlugAcid());
}
public AcidSlug(Serial serial)
: base(serial)
{
}
public override void GenerateLoot()
{
AddLoot(LootPack.Average);
}
public override int GetIdleSound()
{
return 1499;
}
public override int GetAngerSound()
{
return 1496;
}
public override int GetHurtSound()
{
return 1498;
}
public override int GetDeathSound()
{
return 1497;
}
public override bool CheckMovement(Direction d, out int newZ)
{
if (!base.CheckMovement(d, out newZ))
return false;
if (Region.IsPartOf("Underworld") && newZ > Location.Z)
return false;
return true;
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}

View File

@@ -0,0 +1,97 @@
using System;
using Server.Items;
namespace Server.Mobiles
{
[CorpseName("an ore elemental corpse")]
public class AgapiteElemental : BaseCreature
{
[Constructable]
public AgapiteElemental()
: this(25)
{
}
[Constructable]
public AgapiteElemental(int oreAmount)
: base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
{
this.Name = "an agapite elemental";
this.Body = 107;
this.BaseSoundID = 268;
this.SetStr(226, 255);
this.SetDex(126, 145);
this.SetInt(71, 92);
this.SetHits(136, 153);
this.SetDamage(28);
this.SetDamageType(ResistanceType.Physical, 100);
this.SetResistance(ResistanceType.Physical, 30, 40);
this.SetResistance(ResistanceType.Fire, 40, 50);
this.SetResistance(ResistanceType.Cold, 40, 50);
this.SetResistance(ResistanceType.Poison, 30, 40);
this.SetResistance(ResistanceType.Energy, 10, 20);
this.SetSkill(SkillName.MagicResist, 50.1, 95.0);
this.SetSkill(SkillName.Tactics, 60.1, 100.0);
this.SetSkill(SkillName.Wrestling, 60.1, 100.0);
this.Fame = 3500;
this.Karma = -3500;
this.VirtualArmor = 32;
Item ore = new AgapiteOre(oreAmount);
ore.ItemID = 0x19B9;
this.PackItem(ore);
}
public AgapiteElemental(Serial serial)
: base(serial)
{
}
public override bool BleedImmune
{
get
{
return true;
}
}
public override bool AutoDispel
{
get
{
return true;
}
}
public override int TreasureMapLevel
{
get
{
return 1;
}
}
public override void GenerateLoot()
{
this.AddLoot(LootPack.Average);
this.AddLoot(LootPack.Gems, 2);
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}

View File

@@ -0,0 +1,111 @@
using System;
using Server.Items;
namespace Server.Mobiles
{
[CorpseName("an air elemental corpse")]
public class AirElemental : BaseCreature
{
[Constructable]
public AirElemental()
: base(AIType.AI_Mage, FightMode.Closest, 10, 1, 0.2, 0.4)
{
Name = "an air elemental";
Body = 13;
Hue = 0x4001;
BaseSoundID = 655;
SetStr(126, 155);
SetDex(166, 185);
SetInt(101, 125);
SetHits(76, 93);
SetDamage(8, 10);
SetDamageType(ResistanceType.Physical, 20);
SetDamageType(ResistanceType.Cold, 40);
SetDamageType(ResistanceType.Energy, 40);
SetResistance(ResistanceType.Physical, 35, 45);
SetResistance(ResistanceType.Fire, 15, 25);
SetResistance(ResistanceType.Cold, 10, 20);
SetResistance(ResistanceType.Poison, 10, 20);
SetResistance(ResistanceType.Energy, 25, 35);
SetSkill(SkillName.EvalInt, 60.1, 75.0);
SetSkill(SkillName.Magery, 60.1, 75.0);
SetSkill(SkillName.MagicResist, 60.1, 75.0);
SetSkill(SkillName.Tactics, 60.1, 80.0);
SetSkill(SkillName.Wrestling, 60.1, 80.0);
Fame = 4500;
Karma = -4500;
this.VirtualArmor = 40;
switch (Utility.Random(24))
{
case 0: PackItem(new PainSpikeScroll()); break;
case 1: PackItem(new PoisonStrikeScroll()); break;
case 2: PackItem(new StrangleScroll()); break;
case 3: PackItem(new VengefulSpiritScroll()); break;
}
ControlSlots = 2;
}
public AirElemental(Serial serial)
: base(serial)
{
}
public override double DispelDifficulty
{
get
{
return 117.5;
}
}
public override double DispelFocus
{
get
{
return 45.0;
}
}
public override bool BleedImmune
{
get
{
return true;
}
}
public override int TreasureMapLevel
{
get
{
return 1;
}
}
public override void GenerateLoot()
{
AddLoot(LootPack.Average);
AddLoot(LootPack.Meager);
AddLoot(LootPack.LowScrolls);
AddLoot(LootPack.MedScrolls);
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}

View File

@@ -0,0 +1,93 @@
using System;
namespace Server.Mobiles
{
[CorpseName("an alligator corpse")]
public class Alligator : BaseCreature
{
[Constructable]
public Alligator()
: base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
{
Name = "an alligator";
Body = 0xCA;
BaseSoundID = 660;
SetStr(76, 100);
SetDex(6, 25);
SetInt(11, 20);
SetHits(46, 60);
SetStam(46, 65);
SetMana(0);
SetDamage(5, 15);
SetDamageType(ResistanceType.Physical, 100);
SetResistance(ResistanceType.Physical, 25, 35);
SetResistance(ResistanceType.Fire, 5, 10);
SetResistance(ResistanceType.Poison, 5, 10);
SetSkill(SkillName.MagicResist, 25.1, 40.0);
SetSkill(SkillName.Tactics, 40.1, 60.0);
SetSkill(SkillName.Wrestling, 40.1, 60.0);
Fame = 600;
Karma = -600;
VirtualArmor = 30;
Tamable = true;
ControlSlots = 1;
MinTameSkill = 47.1;
}
public Alligator(Serial serial)
: base(serial)
{
}
public override int Meat
{
get
{
return 1;
}
}
public override int Hides
{
get
{
return 12;
}
}
public override HideType HideType
{
get
{
return HideType.Spined;
}
}
public override FoodType FavoriteFood
{
get
{
return FoodType.Meat | FoodType.Fish;
}
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}

View File

@@ -0,0 +1,136 @@
using System;
namespace Server.Mobiles
{
[CorpseName("an ancient liche's corpse")]
public class AncientLich : BaseCreature
{
[Constructable]
public AncientLich()
: base(AIType.AI_NecroMage, FightMode.Closest, 10, 1, 0.2, 0.4)
{
Name = NameList.RandomName("ancient lich");
Body = 78;
BaseSoundID = 412;
SetStr(216, 305);
SetDex(96, 115);
SetInt(966, 1045);
SetHits(560, 595);
SetDamage(15, 27);
SetDamageType(ResistanceType.Physical, 20);
SetDamageType(ResistanceType.Cold, 40);
SetDamageType(ResistanceType.Energy, 40);
SetResistance(ResistanceType.Physical, 55, 65);
SetResistance(ResistanceType.Fire, 25, 30);
SetResistance(ResistanceType.Cold, 50, 60);
SetResistance(ResistanceType.Poison, 50, 60);
SetResistance(ResistanceType.Energy, 25, 30);
SetSkill(SkillName.EvalInt, 120.1, 130.0);
SetSkill(SkillName.Magery, 120.1, 130.0);
SetSkill(SkillName.Meditation, 100.1, 101.0);
SetSkill(SkillName.Poisoning, 100.1, 101.0);
SetSkill(SkillName.MagicResist, 175.2, 200.0);
SetSkill(SkillName.Tactics, 90.1, 100.0);
SetSkill(SkillName.Wrestling, 75.1, 100.0);
SetSkill(SkillName.Necromancy, 120.1, 130.0);
SetSkill(SkillName.SpiritSpeak, 120.1, 130.0);
Fame = 23000;
Karma = -23000;
VirtualArmor = 60;
PackNecroReg(100, 200);
}
public AncientLich(Serial serial)
: base(serial)
{
}
public override TribeType Tribe { get { return TribeType.Undead; } }
public override OppositionGroup OppositionGroup
{
get
{
return OppositionGroup.FeyAndUndead;
}
}
public override bool Unprovokable
{
get
{
return true;
}
}
public override bool BleedImmune
{
get
{
return true;
}
}
public override Poison PoisonImmune
{
get
{
return Poison.Lethal;
}
}
public override int TreasureMapLevel
{
get
{
return 5;
}
}
public override int GetIdleSound()
{
return 0x19D;
}
public override int GetAngerSound()
{
return 0x175;
}
public override int GetDeathSound()
{
return 0x108;
}
public override int GetAttackSound()
{
return 0xE2;
}
public override int GetHurtSound()
{
return 0x28B;
}
public override void GenerateLoot()
{
this.AddLoot(LootPack.FilthyRich, 3);
this.AddLoot(LootPack.MedScrolls, 2);
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}

View File

@@ -0,0 +1,158 @@
using System;
namespace Server.Mobiles
{
[CorpseName("a dragon corpse")]
public class AncientWyrm : BaseCreature
{
[Constructable]
public AncientWyrm()
: base(AIType.AI_Mage, FightMode.Closest, 10, 1, 0.2, 0.4)
{
Name = "an ancient wyrm";
Body = 46;
BaseSoundID = 362;
SetStr(1096, 1185);
SetDex(86, 175);
SetInt(686, 775);
SetHits(658, 711);
SetDamage(29, 35);
SetDamageType(ResistanceType.Physical, 75);
SetDamageType(ResistanceType.Fire, 25);
SetResistance(ResistanceType.Physical, 65, 75);
SetResistance(ResistanceType.Fire, 80, 90);
SetResistance(ResistanceType.Cold, 70, 80);
SetResistance(ResistanceType.Poison, 60, 70);
SetResistance(ResistanceType.Energy, 60, 70);
SetSkill(SkillName.EvalInt, 80.1, 100.0);
SetSkill(SkillName.Magery, 80.1, 100.0);
SetSkill(SkillName.Meditation, 52.5, 75.0);
SetSkill(SkillName.MagicResist, 100.5, 150.0);
SetSkill(SkillName.Tactics, 97.6, 100.0);
SetSkill(SkillName.Wrestling, 97.6, 100.0);
Fame = 22500;
Karma = -22500;
VirtualArmor = 70;
SetSpecialAbility(SpecialAbility.DragonBreath);
}
public AncientWyrm(Serial serial)
: base(serial)
{
}
public override bool ReacquireOnMovement
{
get
{
return true;
}
}
public override bool AutoDispel
{
get
{
return true;
}
}
public override HideType HideType
{
get
{
return HideType.Barbed;
}
}
public override int Hides
{
get
{
return 40;
}
}
public override int Meat
{
get
{
return 19;
}
}
public override int Scales
{
get
{
return 12;
}
}
public override ScaleType ScaleType
{
get
{
return (ScaleType)Utility.Random(4);
}
}
public override Poison PoisonImmune
{
get
{
return Poison.Regular;
}
}
public override Poison HitPoison
{
get
{
return Utility.RandomBool() ? Poison.Lesser : Poison.Regular;
}
}
public override int TreasureMapLevel
{
get
{
return 5;
}
}
public override bool CanFly
{
get
{
return true;
}
}
public override void GenerateLoot()
{
AddLoot(LootPack.FilthyRich, 3);
AddLoot(LootPack.Gems, 5);
}
public override int GetIdleSound()
{
return 0x2D3;
}
public override int GetHurtSound()
{
return 0x2D1;
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}

View File

@@ -0,0 +1,286 @@
using System;
using Server.Items;
namespace Server.Mobiles
{
[CorpseName("an ant lion corpse")]
public class AntLion : BaseCreature
{
private DateTime _NextTunnel;
private Map _StartTunnelMap;
private Point3D _StartTunnelLoc;
private bool _Tunneling;
[Constructable]
public AntLion()
: base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
{
Name = "an ant lion";
Body = 787;
BaseSoundID = 1006;
SetStr(296, 320);
SetDex(81, 105);
SetInt(36, 60);
SetHits(151, 162);
SetDamage(7, 21);
SetDamageType(ResistanceType.Physical, 70);
SetDamageType(ResistanceType.Poison, 30);
SetResistance(ResistanceType.Physical, 45, 60);
SetResistance(ResistanceType.Fire, 25, 35);
SetResistance(ResistanceType.Cold, 30, 40);
SetResistance(ResistanceType.Poison, 40, 50);
SetResistance(ResistanceType.Energy, 30, 35);
SetSkill(SkillName.MagicResist, 70.0);
SetSkill(SkillName.Tactics, 90.0);
SetSkill(SkillName.Wrestling, 90.0);
Fame = 4500;
Karma = -4500;
VirtualArmor = 45;
PackItem(new Bone(3));
PackItem(new FertileDirt(Utility.RandomMinMax(1, 5)));
if (Core.ML && Utility.RandomDouble() < .33)
PackItem(Engines.Plants.Seed.RandomPeculiarSeed(3));
Item orepile = null; /* no trust, no love :( */
switch (Utility.Random(4))
{
case 0:
orepile = new DullCopperOre();
break;
case 1:
orepile = new ShadowIronOre();
break;
case 2:
orepile = new CopperOre();
break;
default:
orepile = new BronzeOre();
break;
}
orepile.Amount = Utility.RandomMinMax(1, 10);
orepile.ItemID = 0x19B9;
PackItem(orepile);
PackBones();
if ( 0.07 >= Utility.RandomDouble() )
{
switch ( Utility.Random( 3 ) )
{
case 0: PackItem( new UnknownBardSkeleton() ); break;
case 1: PackItem( new UnknownMageSkeleton() ); break;
case 2: PackItem( new UnknownRogueSkeleton() ); break;
}
}
SetSpecialAbility(SpecialAbility.DragonBreath);
}
public override void OnThink()
{
base.OnThink();
if (!(Combatant is Mobile))
return;
Mobile combatant = Combatant as Mobile;
if (_NextTunnel < DateTime.UtcNow && combatant.InRange(Location, 10))
{
_NextTunnel = DateTime.UtcNow + TimeSpan.FromSeconds(Utility.RandomMinMax(30, 40));
DoTunnel(combatant);
}
}
private void DoTunnel(Mobile combatant)
{
PublicOverheadMessage(Server.Network.MessageType.Regular, 0x3B3, false, "* The ant lion begins tunneling into the ground *");
Effects.SendTargetParticles(this, 0x36B0, 20, 10, 1734, 0, 5044, EffectLayer.Head, 0);
Frozen = true;
_Tunneling = true;
_StartTunnelLoc = Location;
_StartTunnelMap = Map;
Timer.DelayCall(TimeSpan.FromSeconds(3), () =>
{
if (_Tunneling)
{
Hidden = true;
Blessed = true;
Item item = new InternalItem(3892);
item.MoveToWorld(Location, Map);
item = new InternalItem(4967);
item.MoveToWorld(Location, Map);
Timer.DelayCall(TimeSpan.FromSeconds(3), () =>
{
Hidden = false;
Blessed = false;
if (!combatant.Alive || !combatant.InRange(_StartTunnelLoc, 20) || combatant.Map != _StartTunnelMap)
{
MoveToWorld(_StartTunnelLoc, _StartTunnelMap);
}
else
{
MoveToWorld(combatant.Location, combatant.Map);
AOS.Damage(combatant, this, 25, 70, 0, 0, 30, 0);
Item item2 = new InternalItem(3892);
item2.MoveToWorld(Location, Map);
item2 = new InternalItem(4967);
item2.MoveToWorld(Location, Map);
}
_StartTunnelLoc = Point3D.Zero;
_StartTunnelMap = null;
_Tunneling = false;
Frozen = false;
});
}
});
}
public override int Damage(int amount, Mobile from, bool informMount, bool checkDisrupt)
{
if (_Tunneling && !Hidden && 0.25 > Utility.RandomDouble())
{
PublicOverheadMessage(Server.Network.MessageType.Regular, 0x3B3, false, "* You interrupt the ant lion's digging! *");
Frozen = false;
Hidden = false;
Blessed = false;
_Tunneling = false;
_StartTunnelLoc = Point3D.Zero;
_StartTunnelMap = null;
}
return base.Damage(amount, from, informMount, checkDisrupt);
}
public AntLion(Serial serial)
: base(serial)
{
}
public override void OnGotMeleeAttack(Mobile attacker)
{
if (attacker.Weapon is BaseRanged)
BeginAcidBreath();
base.OnGotMeleeAttack(attacker);
}
public override void OnDamagedBySpell(Mobile attacker)
{
base.OnDamagedBySpell(attacker);
BeginAcidBreath();
}
#region Acid Breath
private DateTime m_NextAcidBreath;
public void BeginAcidBreath()
{
PlayerMobile m = Combatant as PlayerMobile;
// Mobile m = Combatant;
if (m == null || m.Deleted || !m.Alive || !Alive || m_NextAcidBreath > DateTime.Now || !CanBeHarmful(m))
return;
PlaySound(0x118);
MovingEffect(m, 0x36D4, 1, 0, false, false, 0x3F, 0);
TimeSpan delay = TimeSpan.FromSeconds(GetDistanceToSqrt(m) / 5.0);
Timer.DelayCall<Mobile>(delay, new TimerStateCallback<Mobile>(EndAcidBreath), m);
m_NextAcidBreath = DateTime.Now + TimeSpan.FromSeconds(5);
}
public void EndAcidBreath(Mobile m)
{
if (m == null || m.Deleted || !m.Alive || !Alive)
return;
if (0.2 >= Utility.RandomDouble())
m.ApplyPoison(this, Poison.Greater);
AOS.Damage(m, Utility.RandomMinMax(100, 120), 0, 0, 0, 100, 0);
}
#endregion
public override int GetAngerSound() { return 0x5A; }
public override int GetIdleSound() { return 0x5A; }
public override int GetAttackSound() { return 0x164; }
public override int GetHurtSound() { return 0x187; }
public override int GetDeathSound() { return 0x1BA; }
public override void GenerateLoot()
{
AddLoot(LootPack.Average, 2);
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
Hidden = false;
Blessed = false;
}
private class InternalItem : Item
{
public override int LabelNumber { get { return 1027025; } }
public InternalItem(int id)
: base(id)
{
Timer.DelayCall(TimeSpan.FromSeconds(10), Delete);
Hue = 1;
}
public InternalItem(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
Delete();
}
}
}
}

View File

@@ -0,0 +1,79 @@
using System;
using Server.Items;
namespace Server.Mobiles
{
[CorpseName("an arcane daemon corpse")]
public class ArcaneDaemon : BaseCreature
{
[Constructable]
public ArcaneDaemon()
: base(AIType.AI_Mage, FightMode.Closest, 10, 1, 0.2, 0.4)
{
Name = "an arcane daemon";
Body = 0x310;
BaseSoundID = 0x47D;
SetStr(131, 150);
SetDex(126, 145);
SetInt(301, 350);
SetHits(101, 115);
SetDamage(12, 16);
SetDamageType(ResistanceType.Physical, 80);
SetDamageType(ResistanceType.Fire, 20);
SetResistance(ResistanceType.Physical, 50, 60);
SetResistance(ResistanceType.Fire, 70, 80);
SetResistance(ResistanceType.Cold, 10, 20);
SetResistance(ResistanceType.Poison, 50, 60);
SetResistance(ResistanceType.Energy, 30, 40);
SetSkill(SkillName.MagicResist, 85.1, 95.0);
SetSkill(SkillName.Tactics, 70.1, 80.0);
SetSkill(SkillName.Wrestling, 60.1, 80.0);
SetSkill(SkillName.Magery, 80.1, 90.0);
SetSkill(SkillName.EvalInt, 70.1, 80.0);
SetSkill(SkillName.Meditation, 70.1, 80.0);
Fame = 7000;
Karma = -10000;
VirtualArmor = 55;
SetWeaponAbility(WeaponAbility.ConcussionBlow);
}
public ArcaneDaemon(Serial serial)
: base(serial)
{
}
public override Poison PoisonImmune
{
get
{
return Poison.Deadly;
}
}
public override void GenerateLoot()
{
AddLoot(LootPack.Average, 2);
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}

View File

@@ -0,0 +1,131 @@
using System;
using Server.Factions;
using Server.Items;
namespace Server.Mobiles
{
[CorpseName("a arch daemon corpse")]
public class ArchDaemon : BaseCreature
{
[Constructable]
public ArchDaemon()
: base(AIType.AI_Mage, FightMode.Closest, 10, 1, 0.2, 0.4)
{
this.Name = "an Arch Deamon";
this.Body = 40;
this.Hue = 1755;
this.BaseSoundID = 357;
this.SetStr(986, 1185);
this.SetDex(177, 255);
this.SetInt(151, 250);
this.SetHits(592, 711);
this.SetDamage(22, 29);
this.SetDamageType(ResistanceType.Physical, 50);
this.SetDamageType(ResistanceType.Fire, 25);
this.SetDamageType(ResistanceType.Energy, 25);
this.SetResistance(ResistanceType.Physical, 65, 80);
this.SetResistance(ResistanceType.Fire, 60, 80);
this.SetResistance(ResistanceType.Cold, 50, 60);
this.SetResistance(ResistanceType.Poison, 100);
this.SetResistance(ResistanceType.Energy, 40, 50);
this.SetSkill(SkillName.Anatomy, 25.1, 50.0);
this.SetSkill(SkillName.EvalInt, 90.1, 100.0);
this.SetSkill(SkillName.Magery, 95.5, 100.0);
this.SetSkill(SkillName.Meditation, 25.1, 50.0);
this.SetSkill(SkillName.MagicResist, 100.5, 150.0);
this.SetSkill(SkillName.Tactics, 90.1, 100.0);
this.SetSkill(SkillName.Wrestling, 90.1, 100.0);
this.Fame = 24000;
this.Karma = -24000;
this.VirtualArmor = 90;
}
public ArchDaemon(Serial serial)
: base(serial)
{
}
public override double DispelDifficulty
{
get
{
return 125.0;
}
}
public override double DispelFocus
{
get
{
return 45.0;
}
}
public override Faction FactionAllegiance
{
get
{
return Shadowlords.Instance;
}
}
public override Ethics.Ethic EthicAllegiance
{
get
{
return Ethics.Ethic.Evil;
}
}
public override bool CanRummageCorpses
{
get
{
return true;
}
}
public override Poison PoisonImmune
{
get
{
return Poison.Regular;
}
}
public override int TreasureMapLevel
{
get
{
return 4;
}
}
public override int Meat
{
get
{
return 1;
}
}
public override void GenerateLoot()
{
this.AddLoot(LootPack.Rich);
this.AddLoot(LootPack.Average, 2);
this.AddLoot(LootPack.MedScrolls, 2);
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}

View File

@@ -0,0 +1,79 @@
using System;
using Server.Items;
namespace Server.Mobiles
{
[CorpseName("a frozen ogre lord's corpse")]
[TypeAlias("Server.Mobiles.ArticOgreLord")]
public class ArcticOgreLord : BaseCreature
{
[Constructable]
public ArcticOgreLord()
: base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
{
Name = "an arctic ogre lord";
Body = 135;
BaseSoundID = 427;
SetStr(767, 945);
SetDex(66, 75);
SetInt(46, 70);
SetHits(476, 552);
SetDamage(20, 25);
SetDamageType(ResistanceType.Physical, 30);
SetDamageType(ResistanceType.Cold, 70);
SetResistance(ResistanceType.Physical, 45, 55);
SetResistance(ResistanceType.Cold, 60, 70);
SetResistance(ResistanceType.Poison, 100);
SetResistance(ResistanceType.Energy, 40, 50);
SetSkill(SkillName.MagicResist, 125.1, 140.0);
SetSkill(SkillName.Tactics, 90.1, 100.0);
SetSkill(SkillName.Wrestling, 90.1, 100.0);
Fame = 15000;
Karma = -15000;
VirtualArmor = 50;
PackItem(new Club());
}
public ArcticOgreLord(Serial serial)
: base(serial)
{
}
public override Poison PoisonImmune
{
get
{
return Poison.Regular;
}
}
public override int TreasureMapLevel { get { return 3; } }
public override void GenerateLoot()
{
AddLoot(LootPack.FilthyRich);
AddLoot(LootPack.Rich);
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}

View File

@@ -0,0 +1,259 @@
using System;
using System.Collections;
using Server.Items;
namespace Server.Mobiles
{
[CorpseName("a bake kitsune corpse")]
public class BakeKitsune : BaseCreature
{
[Constructable]
public BakeKitsune()
: base(AIType.AI_Mage, FightMode.Closest, 10, 1, 0.2, 0.4)
{
Name = "a bake kitsune";
Body = 246;
SetStr(171, 220);
SetDex(126, 145);
SetInt(376, 425);
SetHits(301, 350);
SetDamage(15, 22);
SetDamageType(ResistanceType.Physical, 70);
SetDamageType(ResistanceType.Energy, 30);
SetResistance(ResistanceType.Physical, 40, 60);
SetResistance(ResistanceType.Fire, 70, 90);
SetResistance(ResistanceType.Cold, 40, 60);
SetResistance(ResistanceType.Poison, 40, 60);
SetResistance(ResistanceType.Energy, 40, 60);
SetSkill(SkillName.EvalInt, 80.1, 90.0);
SetSkill(SkillName.Magery, 80.1, 90.0);
SetSkill(SkillName.MagicResist, 80.1, 100.0);
SetSkill(SkillName.Tactics, 70.1, 90.0);
SetSkill(SkillName.Wrestling, 50.1, 55.0);
Fame = 8000;
Karma = -8000;
Tamable = true;
ControlSlots = 2;
MinTameSkill = 80.7;
if (Utility.RandomDouble() < .25)
PackItem(Engines.Plants.Seed.RandomBonsaiSeed());
SetSpecialAbility(SpecialAbility.Rage);
}
public override void GenerateLoot()
{
AddLoot(LootPack.FilthyRich);
AddLoot(LootPack.Rich);
AddLoot(LootPack.MedScrolls, 2);
}
public override int Meat
{
get
{
return 5;
}
}
public override int Hides
{
get
{
return 30;
}
}
public override HideType HideType
{
get
{
return HideType.Regular;
}
}
public override FoodType FavoriteFood
{
get
{
return FoodType.Fish;
}
}
public override bool ShowFameTitle
{
get
{
return false;
}
}
public override bool ClickTitle
{
get
{
return false;
}
}
public override bool PropertyTitle
{
get
{
return false;
}
}
public override void OnCombatantChange()
{
if (Combatant == null && !IsBodyMod && !Controlled && m_DisguiseTimer == null && Utility.RandomBool())
m_DisguiseTimer = Timer.DelayCall(TimeSpan.FromSeconds(Utility.RandomMinMax(15, 30)), new TimerCallback(Disguise));
}
public override bool OnBeforeDeath()
{
RemoveDisguise();
return base.OnBeforeDeath();
}
#region Disguise
private Timer m_DisguiseTimer;
public void Disguise()
{
if (Combatant != null || IsBodyMod || Controlled)
return;
FixedEffect(0x376A, 8, 32);
PlaySound(0x1FE);
Female = Utility.RandomBool();
if (Female)
{
BodyMod = 0x191;
Name = NameList.RandomName("female");
}
else
{
BodyMod = 0x190;
Name = NameList.RandomName("male");
}
Title = "the mystic llama herder";
Hue = Race.Human.RandomSkinHue();
HairItemID = Race.Human.RandomHair(this);
HairHue = Race.Human.RandomHairHue();
FacialHairItemID = Race.Human.RandomFacialHair(this);
FacialHairHue = HairHue;
switch ( Utility.Random(4) )
{
case 0:
AddItem(new Shoes(Utility.RandomNeutralHue()));
break;
case 1:
AddItem(new Boots(Utility.RandomNeutralHue()));
break;
case 2:
AddItem(new Sandals(Utility.RandomNeutralHue()));
break;
case 3:
AddItem(new ThighBoots(Utility.RandomNeutralHue()));
break;
}
AddItem(new Robe(Utility.RandomNondyedHue()));
m_DisguiseTimer = null;
m_DisguiseTimer = Timer.DelayCall(TimeSpan.FromSeconds(75), new TimerCallback(RemoveDisguise));
}
public void RemoveDisguise()
{
if (!IsBodyMod)
return;
Name = "a bake kitsune";
Title = null;
BodyMod = 0;
Hue = 0;
HairItemID = 0;
HairHue = 0;
FacialHairItemID = 0;
FacialHairHue = 0;
DeleteItemOnLayer(Layer.OuterTorso);
DeleteItemOnLayer(Layer.Shoes);
m_DisguiseTimer = null;
}
public void DeleteItemOnLayer(Layer layer)
{
Item item = FindItemOnLayer(layer);
if (item != null)
item.Delete();
}
#endregion
public override int GetAngerSound()
{
return 0x4DE;
}
public override int GetIdleSound()
{
return 0x4DD;
}
public override int GetAttackSound()
{
return 0x4DC;
}
public override int GetHurtSound()
{
return 0x4DF;
}
public override int GetDeathSound()
{
return 0x4DB;
}
public BakeKitsune(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)1);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
if (version == 0 && PhysicalResistance > 60)
{
SetResistance(ResistanceType.Physical, 40, 60);
SetResistance(ResistanceType.Fire, 70, 90);
SetResistance(ResistanceType.Cold, 40, 60);
SetResistance(ResistanceType.Poison, 40, 60);
SetResistance(ResistanceType.Energy, 40, 60);
}
Timer.DelayCall(TimeSpan.Zero, new TimerCallback(RemoveDisguise));
}
}
}

View File

@@ -0,0 +1,108 @@
using System;
using Server.Items;
namespace Server.Mobiles
{
[CorpseName("a balron corpse")]
public class Balron : BaseCreature
{
[Constructable]
public Balron()
: base(AIType.AI_Mage, FightMode.Closest, 10, 1, 0.2, 0.4)
{
Name = NameList.RandomName("balron");
Body = 40;
BaseSoundID = 357;
SetStr(986, 1185);
SetDex(177, 255);
SetInt(151, 250);
SetHits(592, 711);
SetDamage(22, 29);
SetDamageType(ResistanceType.Physical, 50);
SetDamageType(ResistanceType.Fire, 25);
SetDamageType(ResistanceType.Energy, 25);
SetResistance(ResistanceType.Physical, 65, 80);
SetResistance(ResistanceType.Fire, 60, 80);
SetResistance(ResistanceType.Cold, 50, 60);
SetResistance(ResistanceType.Poison, 100);
SetResistance(ResistanceType.Energy, 40, 50);
SetSkill(SkillName.Anatomy, 25.1, 50.0);
SetSkill(SkillName.EvalInt, 90.1, 100.0);
SetSkill(SkillName.Magery, 95.5, 100.0);
SetSkill(SkillName.Meditation, 25.1, 50.0);
SetSkill(SkillName.MagicResist, 100.5, 150.0);
SetSkill(SkillName.Tactics, 90.1, 100.0);
SetSkill(SkillName.Wrestling, 90.1, 100.0);
Fame = 24000;
Karma = -24000;
VirtualArmor = 90;
PackItem(new Longsword());
}
public Balron(Serial serial)
: base(serial)
{
}
public override bool CanFly
{
get { return true; }
}
public override bool CanRummageCorpses
{
get
{
return true;
}
}
public override Poison PoisonImmune
{
get
{
return Poison.Deadly;
}
}
public override int TreasureMapLevel
{
get
{
return 5;
}
}
public override int Meat
{
get
{
return 1;
}
}
public override void GenerateLoot()
{
this.AddLoot(LootPack.FilthyRich, 2);
this.AddLoot(LootPack.Rich);
this.AddLoot(LootPack.MedScrolls, 2);
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,706 @@
using System;
using Server.Items;
using Server.Network;
using System.Collections.Generic;
using Server.Multis;
namespace Server.Mobiles
{
public enum BlockMountType
{
None = -1,
Dazed,
BolaRecovery,
DismountRecovery,
RidingSwipe,
RidingSwipeEthereal,
RidingSwipeFlying
}
public abstract class BaseMount : BaseCreature, IMount
{
private static Dictionary<Mobile, BlockEntry> m_Table = new Dictionary<Mobile, BlockEntry>();
private Mobile m_Rider;
public BaseMount(string name, int bodyID, int itemID, AIType aiType, FightMode fightMode, int rangePerception, int rangeFight, double activeSpeed, double passiveSpeed)
: base(aiType, fightMode, rangePerception, rangeFight, activeSpeed, passiveSpeed)
{
Name = name;
Body = bodyID;
InternalItem = new MountItem(this, itemID);
}
public BaseMount(Serial serial)
: base(serial)
{
}
public virtual TimeSpan MountAbilityDelay
{
get
{
return TimeSpan.Zero;
}
}
[CommandProperty(AccessLevel.GameMaster)]
public DateTime NextMountAbility { get; set; }
public virtual bool AllowMaleRider
{
get
{
return true;
}
}
public virtual bool AllowFemaleRider
{
get
{
return true;
}
}
[Hue, CommandProperty(AccessLevel.GameMaster)]
public override int Hue
{
get
{
return base.Hue;
}
set
{
base.Hue = value;
if (InternalItem != null)
InternalItem.Hue = value;
}
}
[CommandProperty(AccessLevel.GameMaster)]
public int ItemID
{
get
{
if (InternalItem != null)
return InternalItem.ItemID;
else
return 0;
}
set
{
if (InternalItem != null)
InternalItem.ItemID = value;
}
}
[CommandProperty(AccessLevel.GameMaster)]
public Mobile Rider
{
get
{
return m_Rider;
}
set
{
if (m_Rider != value)
{
if (value == null)
{
Point3D loc = m_Rider.Location;
Map map = m_Rider.Map;
if (map == null || map == Map.Internal)
{
loc = m_Rider.LogoutLocation;
map = m_Rider.LogoutMap;
}
Direction = m_Rider.Direction;
Location = loc;
Map = map;
NetState ns = m_Rider.NetState;
if (ns != null && m_Rider is PlayerMobile && ns.IsEnhancedClient && Commandable)
{
ns.Send(new PetWindow((PlayerMobile)m_Rider, this));
}
if (InternalItem != null)
InternalItem.Internalize();
}
else
{
if (m_Rider != null)
Dismount(m_Rider);
Dismount(value);
if (InternalItem != null)
value.AddItem(InternalItem);
value.Direction = Direction;
Internalize();
}
m_Rider = value;
}
}
}
protected Item InternalItem { get; private set; }
public static bool OnFlightPath(Mobile m)
{
if (!m.Flying)
return false;
StaticTile[] tiles = m.Map.Tiles.GetStaticTiles(m.X, m.Y, true);
ItemData itemData;
bool onpath = false;
for (int i = 0; i < tiles.Length && !onpath; ++i)
{
itemData = TileData.ItemTable[tiles[i].ID & TileData.MaxItemValue];
onpath = (itemData.Name == "hover over");
}
return onpath;
}
public static void Dismount(Mobile dismounted)
{
Dismount(dismounted, dismounted, BlockMountType.None, TimeSpan.MinValue, false);
}
public static void Dismount(Mobile dismounter, Mobile dismounted, BlockMountType blockmounttype, TimeSpan delay)
{
Dismount(dismounter, dismounted, blockmounttype, TimeSpan.MinValue, true);
}
public static void Dismount(Mobile dismounter, Mobile dismounted, BlockMountType blockmounttype, TimeSpan delay, bool message)
{
if (!dismounted.Mounted && !Server.Spells.Ninjitsu.AnimalForm.UnderTransformation(dismounted) && !dismounted.Flying)
return;
if (dismounted is ChaosDragoonElite)
{
dismounter.SendLocalizedMessage(1042047); // You fail to knock the rider from its mount.
}
IMount mount = dismounted.Mount;
if (mount != null)
{
mount.Rider = null;
if (message)
dismounted.SendLocalizedMessage(1040023); // You have been knocked off of your mount!
}
else if (Core.ML && Spells.Ninjitsu.AnimalForm.UnderTransformation(dismounted))
{
Spells.Ninjitsu.AnimalForm.RemoveContext(dismounted, true);
}
else if (dismounted.Flying)
{
if (!OnFlightPath(dismounted))
{
dismounted.Flying = false;
dismounted.Freeze(TimeSpan.FromSeconds(1));
dismounted.Animate(AnimationType.Land, 0);
BuffInfo.RemoveBuff(dismounted, BuffIcon.Fly);
}
}
else
{
return;
}
if (delay != TimeSpan.MinValue)
{
SetMountPrevention(dismounted, mount, blockmounttype, delay);
}
}
public static void SetMountPrevention(Mobile mob, BlockMountType type, TimeSpan duration)
{
SetMountPrevention(mob, null, type, duration);
}
public static void SetMountPrevention(Mobile mob, IMount mount, BlockMountType type, TimeSpan duration)
{
if (mob == null)
return;
DateTime expiration = DateTime.UtcNow + duration;
BlockEntry entry = null;
if (m_Table.ContainsKey(mob))
entry = m_Table[mob];
if (entry != null)
{
entry.m_Type = type;
entry.m_Expiration = expiration;
}
else
{
m_Table[mob] = entry = new BlockEntry(mob, mount, type, expiration);
}
BuffInfo.AddBuff(mob, new BuffInfo(BuffIcon.DismountPrevention, 1075635, 1075636, duration, mob));
}
public static void ClearMountPrevention(Mobile mob)
{
if (mob != null && m_Table.ContainsKey(mob))
m_Table.Remove(mob);
}
public static BlockMountType GetMountPrevention(Mobile mob)
{
return GetMountPrevention(mob, null);
}
public static BlockMountType GetMountPrevention(Mobile mob, BaseMount mount)
{
if (mob == null)
return BlockMountType.None;
BlockEntry entry = null;
if (m_Table.ContainsKey(mob))
entry = m_Table[mob];
if (entry == null)
return BlockMountType.None;
if (entry.IsExpired(mount))
{
return BlockMountType.None;
}
if (Core.TOL && entry.m_Type >= BlockMountType.RidingSwipe && entry.m_Expiration > DateTime.UtcNow)
{
return BlockMountType.DismountRecovery;
}
return entry.m_Type;
}
public static bool CheckMountAllowed(Mobile mob, bool message)
{
return CheckMountAllowed(mob, message, false);
}
public static bool CheckMountAllowed(Mobile mob, bool message, bool flying)
{
return CheckMountAllowed(mob, null, message, flying);
}
public static bool CheckMountAllowed(Mobile mob, BaseMount mount, bool message, bool flying)
{
BlockMountType type = GetMountPrevention(mob, mount);
if (type == BlockMountType.None)
return true;
if (message && mob.NetState != null)
{
switch (type)
{
case BlockMountType.RidingSwipeEthereal:
case BlockMountType.Dazed:
{
mob.PrivateOverheadMessage(MessageType.Regular, 0x3B2, flying ? 1112457 : 1040024, mob.NetState);
// You are still too dazed from being knocked off your mount to ride!
break;
}
case BlockMountType.BolaRecovery:
{
mob.PrivateOverheadMessage(MessageType.Regular, 0x3B2, flying ? 1112455 : 1062910, mob.NetState);
// You cannot mount while recovering from a bola throw.
break;
}
case BlockMountType.RidingSwipe:
{
mob.PrivateOverheadMessage(MessageType.Regular, 0x3B2, 1062934, mob.NetState);
// You must heal your mount before riding it.
break;
}
case BlockMountType.RidingSwipeFlying:
{
mob.PrivateOverheadMessage(MessageType.Regular, 0x3B2, 1112454, mob.NetState);
// You must heal your mount before riding it.
break;
}
case BlockMountType.DismountRecovery:
{
mob.PrivateOverheadMessage(MessageType.Regular, 0x3B2, flying ? 1112456 : 1070859, mob.NetState);
// You cannot mount while recovering from a dismount special maneuver.
break;
}
}
}
return false;
}
public static void ExpireMountPrevention(Mobile m)
{
if(m_Table.ContainsKey(m))
m_Table.Remove(m);
BuffInfo.RemoveBuff(m, BuffIcon.DismountPrevention);
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)1); // version
writer.Write(NextMountAbility);
writer.Write(m_Rider);
writer.Write(InternalItem);
}
public override bool OnBeforeDeath()
{
Rider = null;
return base.OnBeforeDeath();
}
public override void OnAfterDelete()
{
if (InternalItem != null)
InternalItem.Delete();
InternalItem = null;
base.OnAfterDelete();
}
public override void OnDelete()
{
Rider = null;
base.OnDelete();
}
public override void OnDeath(Container c)
{
base.OnDeath(c);
var owner = GetMaster();
if (owner != null && m_Table.ContainsKey(owner))
{
var entry = m_Table[owner];
if (entry.m_Type >= BlockMountType.RidingSwipe && entry.m_Mount == this)
{
ExpireMountPrevention(owner);
}
}
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
switch ( version )
{
case 1:
{
NextMountAbility = reader.ReadDateTime();
goto case 0;
}
case 0:
{
m_Rider = reader.ReadMobile();
InternalItem = reader.ReadItem();
if (InternalItem == null)
Delete();
break;
}
}
}
public virtual void OnDisallowedRider(Mobile m)
{
m.SendMessage("You may not ride this creature.");
}
public override void OnDoubleClick(Mobile from)
{
if (IsDeadPet)
return;
if (from.IsBodyMod && !from.Body.IsHuman)
{
if (Core.AOS) // You cannot ride a mount in your current form.
PrivateOverheadMessage(Network.MessageType.Regular, 0x3B2, 1062061, from.NetState);
else
from.SendLocalizedMessage(1061628); // You can't do that while polymorphed.
return;
}
if (!CheckMountAllowed(from, this, true, false))
return;
if (from.Mount is BaseBoat)
{
return;
}
if (from.Mounted)
{
from.SendLocalizedMessage(1005583); // Please dismount first.
return;
}
if (from.Race == Race.Gargoyle && from.IsPlayer())
{
from.SendLocalizedMessage(1112281);
OnDisallowedRider(from);
return;
}
if (from.Female ? !AllowFemaleRider : !AllowMaleRider)
{
OnDisallowedRider(from);
return;
}
if (!Multis.DesignContext.Check(from))
return;
if (from.HasTrade)
{
from.SendLocalizedMessage(1042317); // You may not ride at this time
return;
}
if (from.InRange(this, 1))
{
bool canAccess = (from.AccessLevel >= AccessLevel.GameMaster) ||
(Controlled && ControlMaster == from) ||
(Summoned && SummonMaster == from);
if (canAccess)
{
if (Poisoned)
PrivateOverheadMessage(Network.MessageType.Regular, 0x3B2, 1049692, from.NetState); // This mount is too ill to ride.
else
Rider = from;
}
else if (!Controlled && !Summoned)
{
// That mount does not look broken! You would have to tame it to ride it.
PrivateOverheadMessage(Network.MessageType.Regular, 0x3B2, 501263, from.NetState);
}
else
{
// This isn't your mount; it refuses to let you ride.
PrivateOverheadMessage(Network.MessageType.Regular, 0x3B2, 501264, from.NetState);
}
}
else
{
from.SendLocalizedMessage(500206); // That is too far away to ride.
}
}
public virtual void OnRiderDamaged(Mobile from, ref int amount, bool willKill)
{
if (m_Rider == null)
return;
Mobile attacker = from;
if (attacker == null)
attacker = m_Rider.FindMostRecentDamager(true);
if (!(attacker == this || attacker == m_Rider || willKill || DateTime.UtcNow > NextMountAbility))
{
if (DoMountAbility(amount, from))
NextMountAbility = DateTime.UtcNow + MountAbilityDelay;
}
}
[Obsolete("Call: OnRiderDamaged(Mobile from, ref int amount, bool willKill)")]
public virtual void OnRiderDamaged(int amount, Mobile from, bool willKill)
{
OnRiderDamaged(from, ref amount, willKill);
}
public virtual bool DoMountAbility(int damage, Mobile attacker)
{
return false;
}
private class BlockEntry
{
public Mobile m_Mobile;
public IMount m_Mount;
public BlockMountType m_Type;
public DateTime m_Expiration;
public BlockEntry(Mobile m, IMount mount, BlockMountType type, DateTime expiration)
{
m_Mobile = m;
m_Mount = mount;
m_Type = type;
m_Expiration = expiration;
}
public bool IsExpired(BaseMount mount)
{
if (m_Type >= BlockMountType.RidingSwipe)
{
if (Core.SA && DateTime.UtcNow < m_Expiration)
{
return false;
}
else
{
if (mount != m_Mount)
{
return true;
}
switch (m_Type)
{
default:
case BlockMountType.RidingSwipe:
{
if ((!Core.SA && m_Mount == null) || m_Mount is Mobile && ((Mobile)m_Mount).Hits >= ((Mobile)m_Mount).HitsMax)
{
BaseMount.ExpireMountPrevention(m_Mobile);
return true;
}
}
break;
case BlockMountType.RidingSwipeEthereal:
{
BaseMount.ExpireMountPrevention(m_Mobile);
return true;
}
case BlockMountType.RidingSwipeFlying:
{
if (m_Mobile.Hits >= m_Mobile.HitsMax)
{
BaseMount.ExpireMountPrevention(m_Mobile);
return true;
}
}
break;
}
}
return false;
}
if (DateTime.UtcNow >= m_Expiration)
{
BaseMount.ExpireMountPrevention(m_Mobile);
return true;
}
return false;
}
}
}
public class MountItem : Item, IMountItem
{
private BaseMount m_Mount;
public MountItem(BaseMount mount, int itemID)
: base(itemID)
{
Layer = Layer.Mount;
Movable = false;
m_Mount = mount;
}
public MountItem(Serial serial)
: base(serial)
{
}
public override double DefaultWeight
{
get
{
return 0;
}
}
public IMount Mount
{
get
{
return m_Mount;
}
}
public override void OnAfterDelete()
{
if (m_Mount != null)
m_Mount.Delete();
m_Mount = null;
base.OnAfterDelete();
}
public override DeathMoveResult OnParentDeath(Mobile parent)
{
if (m_Mount != null)
m_Mount.Rider = null;
return DeathMoveResult.RemainEquiped;
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
writer.Write(m_Mount);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
switch ( version )
{
case 0:
{
m_Mount = reader.ReadMobile() as BaseMount;
if (m_Mount == null)
Delete();
break;
}
}
}
}
}

View File

@@ -0,0 +1,176 @@
using System;
using System.Collections.Generic;
using Server.Items;
namespace Server.Mobiles
{
public abstract class BaseRenowned : BaseCreature
{
Dictionary<Mobile, int> m_DamageEntries;
public BaseRenowned(AIType aiType)
: this(aiType, FightMode.Closest)
{
}
public BaseRenowned(AIType aiType, FightMode mode)
: base(aiType, mode, 18, 1, 0.1, 0.2)
{
}
public BaseRenowned(Serial serial)
: base(serial)
{
}
public abstract Type[] UniqueSAList { get; }
public abstract Type[] SharedSAList { get; }
public virtual bool NoGoodies
{
get
{
return false;
}
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
public virtual void RegisterDamageTo(Mobile m)
{
if (m == null)
return;
foreach (DamageEntry de in m.DamageEntries)
{
Mobile damager = de.Damager;
Mobile master = damager.GetDamageMaster(m);
if (master != null)
damager = master;
RegisterDamage(damager, de.DamageGiven);
}
}
public void RegisterDamage(Mobile from, int amount)
{
if (from == null || !from.Player)
return;
if (m_DamageEntries.ContainsKey(from))
m_DamageEntries[from] += amount;
else
m_DamageEntries.Add(from, amount);
}
public void AwardArtifact(Item artifact)
{
if (artifact == null)
return;
int totalDamage = 0;
Dictionary<Mobile, int> validEntries = new Dictionary<Mobile, int>();
foreach (KeyValuePair<Mobile, int> kvp in m_DamageEntries)
{
if (IsEligible(kvp.Key, artifact))
{
validEntries.Add(kvp.Key, kvp.Value);
totalDamage += kvp.Value;
}
}
int randomDamage = Utility.RandomMinMax(1, totalDamage);
totalDamage = 0;
foreach (KeyValuePair<Mobile, int> kvp in m_DamageEntries)
{
totalDamage += kvp.Value;
if (totalDamage > randomDamage)
{
GiveArtifact(kvp.Key, artifact);
break;
}
}
}
public void GiveArtifact(Mobile to, Item artifact)
{
if (to == null || artifact == null)
return;
to.PlaySound(0x5B4);
Container pack = to.Backpack;
if (pack == null || !pack.TryDropItem(to, artifact, false))
artifact.Delete();
else
to.SendLocalizedMessage(1062317); // For your valor in combating the fallen beast, a special artifact has been bestowed on you.
}
public bool IsEligible(Mobile m, Item Artifact)
{
return m.Player && m.Alive && m.InRange(Location, 32) && m.Backpack != null && m.Backpack.CheckHold(m, Artifact, false);
}
public Item GetArtifact()
{
double random = Utility.RandomDouble();
if (0.05 >= random)
return CreateArtifact(UniqueSAList);
else if (0.15 >= random)
return CreateArtifact(SharedSAList);
return null;
}
public Item CreateArtifact(Type[] list)
{
if (list.Length == 0)
return null;
int random = Utility.Random(list.Length);
Type type = list[random];
Item artifact = Loot.Construct(type);
return artifact;
}
public override bool OnBeforeDeath()
{
if (!NoKillAwards)
{
if (NoGoodies)
return base.OnBeforeDeath();
m_DamageEntries = new Dictionary<Mobile, int>();
RegisterDamageTo(this);
AwardArtifact(GetArtifact());
}
return base.OnBeforeDeath();
}
}
}

View File

@@ -0,0 +1,191 @@
using System;
using System.Collections.Generic;
using Server.Items;
namespace Server.Mobiles
{
[TypeAlias("Server.Mobiles.BaseSABosses")]
public abstract class BaseSABoss : BasePeerless
{
public override bool GiveMLSpecial { get { return false; } }
Dictionary<Mobile, int> m_DamageEntries;
public BaseSABoss(AIType aiType, FightMode fightMode, int rangePerception, int rangeFight, double activeSpeed, double passiveSpeed)
: base(aiType, fightMode, rangePerception, rangeFight, activeSpeed, passiveSpeed)
{
}
public BaseSABoss(Serial serial)
: base(serial)
{
}
public abstract Type[] UniqueSAList { get; }
public abstract Type[] SharedSAList { get; }
public virtual bool NoGoodies
{
get
{
return false;
}
}
public override bool DropPrimer { get { return false; } }
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
public virtual void RegisterDamageTo(Mobile m)
{
if (m == null)
return;
foreach (DamageEntry de in m.DamageEntries)
{
Mobile damager = de.Damager;
Mobile master = damager.GetDamageMaster(m);
if (master != null)
damager = master;
RegisterDamage(damager, de.DamageGiven);
}
}
public void RegisterDamage(Mobile from, int amount)
{
if (from == null || !from.Player)
return;
if (m_DamageEntries.ContainsKey(from))
m_DamageEntries[from] += amount;
else
m_DamageEntries.Add(from, amount);
}
public void AwardArtifact(Item artifact)
{
if (artifact == null)
return;
int totalDamage = 0;
Dictionary<Mobile, int> validEntries = new Dictionary<Mobile, int>();
foreach (KeyValuePair<Mobile, int> kvp in m_DamageEntries)
{
if (IsEligible(kvp.Key, artifact))
{
validEntries.Add(kvp.Key, kvp.Value);
totalDamage += kvp.Value;
}
}
int randomDamage = Utility.RandomMinMax(1, totalDamage);
totalDamage = 0;
foreach (KeyValuePair<Mobile, int> kvp in m_DamageEntries)
{
totalDamage += kvp.Value;
if (totalDamage > randomDamage)
{
GiveArtifact(kvp.Key, artifact);
break;
}
}
}
public void GiveArtifact(Mobile to, Item artifact)
{
if (to == null || artifact == null)
return;
to.PlaySound(0x5B4);
Container pack = to.Backpack;
if (pack == null || !pack.TryDropItem(to, artifact, false))
artifact.Delete();
else
to.SendLocalizedMessage(1062317); // For your valor in combating the fallen beast, a special artifact has been bestowed on you.
}
public bool IsEligible(Mobile m, Item Artifact)
{
return m.Player && m.Alive && m.InRange(Location, 32) && m.Backpack != null && m.Backpack.CheckHold(m, Artifact, false);
}
public Item GetArtifact()
{
double random = Utility.RandomDouble();
if (0.05 >= random)
return CreateArtifact(UniqueSAList);
else if (0.15 >= random)
return CreateArtifact(SharedSAList);
return null;
}
public Item CreateArtifact(Type[] list)
{
if (list.Length == 0)
return null;
int random = Utility.Random(list.Length);
Type type = list[random];
Item artifact = Loot.Construct(type);
return artifact;
}
public override bool OnBeforeDeath()
{
if (!NoKillAwards)
{
m_DamageEntries = new Dictionary<Mobile, int>();
RegisterDamageTo(this);
AwardArtifact(GetArtifact());
}
return base.OnBeforeDeath();
}
public override void OnDeath(Container c)
{
if (Map == Map.Felucca || Map == Map.TerMur)
{
//TODO: Confirm SE change or AoS one too?
List<DamageStore> rights = GetLootingRights();
List<Mobile> toGive = new List<Mobile>();
for (int i = rights.Count - 1; i >= 0; --i)
{
DamageStore ds = rights[i];
if (ds.m_HasRight)
toGive.Add(ds.m_Mobile);
}
}
base.OnDeath(c);
}
}
}

View File

@@ -0,0 +1,106 @@
using System;
namespace Server.Mobiles
{
[CorpseName("a chicken lizard corpse")]
public class BattleChickenLizard : BaseCreature
{
[Constructable]
public BattleChickenLizard()
: base(AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.05, 0.1)
{
Name = "a battle chicken lizard";
Body = 716;
SetStr(94, 177);
SetDex(78, 124);
SetInt(6, 13);
SetHits(94, 177);
SetDamage(5, 15);
SetDamageType(ResistanceType.Physical, 100);
SetResistance(ResistanceType.Physical, 15, 20);
SetResistance(ResistanceType.Fire, 5, 15);
SetSkill(SkillName.MagicResist, 30.0, 53.0);
SetSkill(SkillName.Tactics, 50.0, 62.0);
SetSkill(SkillName.Wrestling, 50.0, 62.0);
Tamable = true;
ControlSlots = 1;
MinTameSkill = 0.0;
}
public override int Meat { get { return 3; } }
public override MeatType MeatType { get { return MeatType.Bird; } }
public override FoodType FavoriteFood { get { return FoodType.GrainsAndHay; } }
public override int GetIdleSound() { return 1511; }
public override int GetAngerSound() { return 1508; }
public override int GetHurtSound() { return 1510; }
public override int GetDeathSound() { return 1509; }
public override IDamageable Combatant
{
get { return base.Combatant; }
set
{
base.Combatant = value;
if (!Controlled)
{
if (0.05 > Utility.RandomDouble())
{
StopFlee();
}
else if (!CheckFlee())
{
BeginFlee(TimeSpan.FromSeconds(30));
}
}
}
}
public override bool CheckFlee()
{
if (Controlled)
{
return base.CheckFlee();
}
return DateTime.UtcNow < EndFleeTime;
}
public override void OnAfterTame(Mobile tamer)
{
ActiveSpeed = 0.2;
PassiveSpeed = 0.4;
if (Frozen)
Frozen = false;
StopFlee();
}
public BattleChickenLizard(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}

View File

@@ -0,0 +1,232 @@
using System;
using System.Collections.Generic;
using Server.ContextMenus;
using Server.Items;
namespace Server.Mobiles
{
[CorpseName("a giant beetle corpse")]
public class Beetle : BaseMount
{
public virtual double BoostedSpeed
{
get
{
return 0.1;
}
}
[Constructable]
public Beetle()
: this("a giant beetle")
{
}
public override bool SubdueBeforeTame
{
get
{
return true;
}
}// Must be beaten into submission
public override bool ReduceSpeedWithDamage
{
get
{
return false;
}
}
[Constructable]
public Beetle(string name)
: base(name, 0x317, 0x3EBC, AIType.AI_Melee, FightMode.Closest, 10, 1, 0.25, 0.5)
{
SetStr(300);
SetDex(100);
SetInt(500);
SetHits(200);
SetDamage(7, 20);
SetDamageType(ResistanceType.Physical, 100);
SetResistance(ResistanceType.Physical, 30, 40);
SetResistance(ResistanceType.Fire, 20, 30);
SetResistance(ResistanceType.Cold, 20, 30);
SetResistance(ResistanceType.Poison, 20, 30);
SetResistance(ResistanceType.Energy, 20, 30);
SetSkill(SkillName.MagicResist, 80.0);
SetSkill(SkillName.Tactics, 100.0);
SetSkill(SkillName.Wrestling, 100.0);
Fame = 4000;
Karma = -4000;
Tamable = true;
ControlSlots = 3;
MinTameSkill = 29.1;
Container pack = Backpack;
if (pack != null)
pack.Delete();
pack = new StrongBackpack();
pack.Movable = false;
AddItem(pack);
}
public override int GetAngerSound()
{
return 0x21D;
}
public override int GetIdleSound()
{
return 0x21D;
}
public override int GetAttackSound()
{
return 0x162;
}
public override int GetHurtSound()
{
return 0x163;
}
public override int GetDeathSound()
{
return 0x21D;
}
public override FoodType FavoriteFood
{
get
{
return FoodType.Meat;
}
}
public override bool CanAutoStable { get { return (Backpack == null || Backpack.Items.Count == 0) && base.CanAutoStable; } }
public Beetle(Serial serial)
: base(serial)
{
}
public override void OnHarmfulSpell(Mobile from)
{
if (!Controlled && ControlMaster == null)
CurrentSpeed = BoostedSpeed;
}
public override void OnCombatantChange()
{
if (Combatant == null && !Controlled && ControlMaster == null)
CurrentSpeed = PassiveSpeed;
}
#region Pack Animal Methods
public override bool OnBeforeDeath()
{
if (!base.OnBeforeDeath())
return false;
PackAnimal.CombineBackpacks(this);
return true;
}
public override DeathMoveResult GetInventoryMoveResultFor(Item item)
{
return DeathMoveResult.MoveToCorpse;
}
public override bool IsSnoop(Mobile from)
{
if (PackAnimal.CheckAccess(this, from))
return false;
return base.IsSnoop(from);
}
public override bool OnDragDrop(Mobile from, Item item)
{
if (CheckFeed(from, item))
return true;
if (PackAnimal.CheckAccess(this, from))
{
AddToBackpack(item);
return true;
}
return base.OnDragDrop(from, item);
}
public override bool CheckNonlocalDrop(Mobile from, Item item, Item target)
{
return PackAnimal.CheckAccess(this, from);
}
public override bool CheckNonlocalLift(Mobile from, Item item)
{
return PackAnimal.CheckAccess(this, from);
}
public override void GetContextMenuEntries(Mobile from, List<ContextMenuEntry> list)
{
base.GetContextMenuEntries(from, list);
PackAnimal.GetContextMenuEntries(this, from, list);
}
#endregion
public override void OnAfterTame(Mobile tamer)
{
base.OnAfterTame(tamer);
if (Owners.Count == 0 && PetTrainingHelper.Enabled)
{
SetInt(500);
}
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)1); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
if (version < 1 && PetTrainingHelper.Enabled && ControlSlots <= 3)
{
var profile = PetTrainingHelper.GetAbilityProfile(this);
if (profile == null || !profile.HasCustomized())
{
MinTameSkill = 98.7;
ControlSlotsMin = 1;
ControlSlots = 1;
}
if ((ControlMaster != null || IsStabled) && Int < 500)
{
SetInt(500);
}
}
}
}
}

View File

@@ -0,0 +1,181 @@
using System;
using Server.Items;
using Server.Network;
namespace Server.Mobiles
{
[CorpseName("a betrayer corpse")]
public class Betrayer : BaseCreature
{
private DateTime m_NextAbilityTime;
[Constructable]
public Betrayer()
: base(AIType.AI_Mage, FightMode.Closest, 10, 1, 0.2, 0.4)
{
Name = "a betrayer";
Body = 767;
SetStr(401, 500);
SetDex(81, 100);
SetInt(151, 200);
SetHits(241, 300);
SetDamage(16, 22);
SetDamageType(ResistanceType.Physical, 100);
SetResistance(ResistanceType.Physical, 60, 70);
SetResistance(ResistanceType.Fire, 60, 70);
SetResistance(ResistanceType.Cold, 60, 70);
SetResistance(ResistanceType.Poison, 30, 40);
SetResistance(ResistanceType.Energy, 20, 30);
SetSkill(SkillName.Anatomy, 90.1, 100.0);
SetSkill(SkillName.EvalInt, 90.1, 100.0);
SetSkill(SkillName.Magery, 50.1, 100.0);
SetSkill(SkillName.Meditation, 90.1, 100.0);
SetSkill(SkillName.MagicResist, 120.1, 130.0);
SetSkill(SkillName.Tactics, 90.1, 100.0);
SetSkill(SkillName.Wrestling, 90.1, 100.0);
Fame = 15000;
Karma = -15000;
VirtualArmor = 65;
SpeechHue = Utility.RandomDyedHue();
PackItem(new PowerCrystal());
if (0.02 > Utility.RandomDouble())
PackItem(new BlackthornWelcomeBook());
m_NextAbilityTime = DateTime.UtcNow + TimeSpan.FromSeconds(Utility.RandomMinMax(5, 30));
SetSpecialAbility(SpecialAbility.ColossalBlow);
}
public Betrayer(Serial serial)
: base(serial)
{
}
public override bool AlwaysMurderer
{
get
{
return true;
}
}
public override bool BardImmune
{
get
{
return !Core.AOS;
}
}
public override Poison PoisonImmune
{
get
{
return Poison.Lethal;
}
}
public override int Meat
{
get
{
return 1;
}
}
public override int TreasureMapLevel
{
get
{
return 5;
}
}
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 GetDeathSound()
{
return 0x423;
}
public override int GetAttackSound()
{
return 0x23B;
}
public override int GetHurtSound()
{
return 0x140;
}
public override void GenerateLoot()
{
AddLoot(LootPack.FilthyRich);
AddLoot(LootPack.Rich);
AddLoot(LootPack.Gems, 1);
}
public override void OnActionCombat()
{
Mobile combatant = Combatant as Mobile;
if (DateTime.UtcNow < m_NextAbilityTime || combatant == null || combatant.Deleted || combatant.Map != Map || !InRange(combatant, 3) || !CanBeHarmful(combatant) || !InLOS(combatant))
return;
m_NextAbilityTime = DateTime.UtcNow + TimeSpan.FromSeconds(Utility.RandomMinMax(5, 30));
if (Utility.RandomBool())
{
FixedParticles(0x376A, 9, 32, 0x2539, EffectLayer.LeftHand);
PlaySound(0x1DE);
IPooledEnumerable eable = GetMobilesInRange(2);
foreach (Mobile m in eable)
{
if (m != this && IsEnemy(m))
{
m.ApplyPoison(this, Poison.Deadly);
}
}
eable.Free();
}
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}

View File

@@ -0,0 +1,188 @@
using System;
namespace Server.Mobiles
{
[CorpseName("a bird corpse")]
public class Bird : BaseCreature
{
[Constructable]
public Bird()
: base(AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
{
if (Utility.RandomBool())
{
this.Hue = 0x901;
switch ( Utility.Random(3) )
{
case 0:
this.Name = "a crow";
break;
case 2:
this.Name = "a raven";
break;
case 1:
this.Name = "a magpie";
break;
}
}
else
{
this.Hue = Utility.RandomBirdHue();
this.Name = NameList.RandomName("bird");
}
this.Body = 6;
this.BaseSoundID = 0x1B;
this.VirtualArmor = Utility.RandomMinMax(0, 6);
this.SetStr(10);
this.SetDex(25, 35);
this.SetInt(10);
this.SetDamage(0);
this.SetDamageType(ResistanceType.Physical, 100);
this.SetSkill(SkillName.Wrestling, 4.2, 6.4);
this.SetSkill(SkillName.Tactics, 4.0, 6.0);
this.SetSkill(SkillName.MagicResist, 4.0, 5.0);
this.Fame = 150;
this.Karma = 0;
this.Tamable = true;
this.ControlSlots = 1;
this.MinTameSkill = -6.9;
}
public Bird(Serial serial)
: base(serial)
{
}
public override MeatType MeatType
{
get
{
return MeatType.Bird;
}
}
public override int Meat
{
get
{
return 1;
}
}
public override int Feathers
{
get
{
return 25;
}
}
public override FoodType FavoriteFood
{
get
{
return FoodType.FruitsAndVegies | FoodType.GrainsAndHay;
}
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
[CorpseName("a bird corpse")]
public class TropicalBird : BaseCreature
{
[Constructable]
public TropicalBird()
: base(AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
{
this.Hue = Utility.RandomBirdHue();
this.Name = "a tropical bird";
this.Body = 6;
this.BaseSoundID = 0xBF;
this.VirtualArmor = Utility.RandomMinMax(0, 6);
this.SetStr(10);
this.SetDex(25, 35);
this.SetInt(10);
this.SetDamage(0);
this.SetDamageType(ResistanceType.Physical, 100);
this.SetSkill(SkillName.Wrestling, 4.2, 6.4);
this.SetSkill(SkillName.Tactics, 4.0, 6.0);
this.SetSkill(SkillName.MagicResist, 4.0, 5.0);
this.Fame = 150;
this.Karma = 0;
this.Tamable = true;
this.ControlSlots = 1;
this.MinTameSkill = -6.9;
}
public TropicalBird(Serial serial)
: base(serial)
{
}
public override MeatType MeatType
{
get
{
return MeatType.Bird;
}
}
public override int Meat
{
get
{
return 1;
}
}
public override int Feathers
{
get
{
return 25;
}
}
public override FoodType FavoriteFood
{
get
{
return FoodType.FruitsAndVegies | FoodType.GrainsAndHay;
}
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}

View File

@@ -0,0 +1,93 @@
using System;
namespace Server.Mobiles
{
[CorpseName("a bear corpse")]
[TypeAlias("Server.Mobiles.Bear")]
public class BlackBear : BaseCreature
{
[Constructable]
public BlackBear()
: base(AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
{
this.Name = "a black bear";
this.Body = 211;
this.BaseSoundID = 0xA3;
this.SetStr(76, 100);
this.SetDex(56, 75);
this.SetInt(11, 14);
this.SetHits(46, 60);
this.SetMana(0);
this.SetDamage(4, 10);
this.SetDamageType(ResistanceType.Physical, 100);
this.SetResistance(ResistanceType.Physical, 20, 25);
this.SetResistance(ResistanceType.Cold, 10, 15);
this.SetResistance(ResistanceType.Poison, 5, 10);
this.SetSkill(SkillName.MagicResist, 20.1, 40.0);
this.SetSkill(SkillName.Tactics, 40.1, 60.0);
this.SetSkill(SkillName.Wrestling, 40.1, 60.0);
this.Fame = 450;
this.Karma = 0;
this.VirtualArmor = 24;
this.Tamable = true;
this.ControlSlots = 1;
this.MinTameSkill = 35.1;
}
public BlackBear(Serial serial)
: base(serial)
{
}
public override int Meat
{
get
{
return 1;
}
}
public override int Hides
{
get
{
return 12;
}
}
public override FoodType FavoriteFood
{
get
{
return FoodType.Fish | FoodType.Meat | FoodType.FruitsAndVegies;
}
}
public override PackInstinct PackInstinct
{
get
{
return PackInstinct.Bear;
}
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}

View File

@@ -0,0 +1,111 @@
using System;
using Server.Items;
namespace Server.Mobiles
{
[CorpseName("a solen infiltrator corpse")] // TODO: Corpse name?
public class BlackSolenInfiltratorQueen : BaseCreature, IBlackSolen
{
[Constructable]
public BlackSolenInfiltratorQueen()
: base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
{
this.Name = "a black solen infiltrator";
this.Body = 807;
this.BaseSoundID = 959;
this.Hue = 0x453;
this.SetStr(326, 350);
this.SetDex(141, 165);
this.SetInt(96, 120);
this.SetHits(151, 162);
this.SetDamage(10, 15);
this.SetDamageType(ResistanceType.Physical, 70);
this.SetDamageType(ResistanceType.Poison, 30);
this.SetResistance(ResistanceType.Physical, 30, 40);
this.SetResistance(ResistanceType.Fire, 30, 35);
this.SetResistance(ResistanceType.Cold, 25, 35);
this.SetResistance(ResistanceType.Poison, 35, 40);
this.SetResistance(ResistanceType.Energy, 25, 30);
this.SetSkill(SkillName.MagicResist, 90.0);
this.SetSkill(SkillName.Tactics, 90.0);
this.SetSkill(SkillName.Wrestling, 90.0);
this.Fame = 6500;
this.Karma = -6500;
this.VirtualArmor = 50;
SolenHelper.PackPicnicBasket(this);
this.PackItem(new ZoogiFungus((0.05 > Utility.RandomDouble()) ? 16 : 4));
}
public BlackSolenInfiltratorQueen(Serial serial)
: base(serial)
{
}
public override int GetAngerSound()
{
return 0x259;
}
public override int GetIdleSound()
{
return 0x259;
}
public override int GetAttackSound()
{
return 0x195;
}
public override int GetHurtSound()
{
return 0x250;
}
public override int GetDeathSound()
{
return 0x25B;
}
public override void GenerateLoot()
{
this.AddLoot(LootPack.Rich);
}
public override bool IsEnemy(Mobile m)
{
if (SolenHelper.CheckBlackFriendship(m))
return false;
else
return base.IsEnemy(m);
}
public override void OnDamage(int amount, Mobile from, bool willKill)
{
SolenHelper.OnBlackDamage(from);
base.OnDamage(amount, from, willKill);
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}

View File

@@ -0,0 +1,112 @@
using System;
using Server.Items;
namespace Server.Mobiles
{
[CorpseName("a solen infiltrator corpse")]
public class BlackSolenInfiltratorWarrior : BaseCreature, IBlackSolen
{
[Constructable]
public BlackSolenInfiltratorWarrior()
: base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
{
this.Name = "a black solen infiltrator";
this.Body = 806;
this.BaseSoundID = 959;
this.Hue = 0x453;
this.SetStr(206, 230);
this.SetDex(121, 145);
this.SetInt(66, 90);
this.SetHits(96, 107);
this.SetDamage(5, 15);
this.SetDamageType(ResistanceType.Physical, 80);
this.SetDamageType(ResistanceType.Poison, 20);
this.SetResistance(ResistanceType.Physical, 20, 35);
this.SetResistance(ResistanceType.Fire, 20, 35);
this.SetResistance(ResistanceType.Cold, 10, 25);
this.SetResistance(ResistanceType.Poison, 20, 35);
this.SetResistance(ResistanceType.Energy, 10, 25);
this.SetSkill(SkillName.MagicResist, 80.0);
this.SetSkill(SkillName.Tactics, 80.0);
this.SetSkill(SkillName.Wrestling, 80.0);
this.Fame = 3000;
this.Karma = -3000;
this.VirtualArmor = 40;
SolenHelper.PackPicnicBasket(this);
this.PackItem(new ZoogiFungus((0.05 > Utility.RandomDouble()) ? 13 : 3));
}
public BlackSolenInfiltratorWarrior(Serial serial)
: base(serial)
{
}
public override int GetAngerSound()
{
return 0xB5;
}
public override int GetIdleSound()
{
return 0xB5;
}
public override int GetAttackSound()
{
return 0x289;
}
public override int GetHurtSound()
{
return 0xBC;
}
public override int GetDeathSound()
{
return 0xE4;
}
public override void GenerateLoot()
{
this.AddLoot(LootPack.Average, 2);
this.AddLoot(LootPack.Gems, Utility.RandomMinMax(1, 4));
}
public override bool IsEnemy(Mobile m)
{
if (SolenHelper.CheckBlackFriendship(m))
return false;
else
return base.IsEnemy(m);
}
public override void OnDamage(int amount, Mobile from, bool willKill)
{
SolenHelper.OnBlackDamage(from);
base.OnDamage(amount, from, willKill);
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}

View File

@@ -0,0 +1,323 @@
using System;
using System.Collections;
using Server.Items;
using Server.Network;
namespace Server.Mobiles
{
[CorpseName("a solen queen corpse")]
public class BlackSolenQueen : BaseCreature, IBlackSolen
{
private bool m_BurstSac;
private static bool m_Laid;
[Constructable]
public BlackSolenQueen()
: base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
{
this.Name = "a black solen queen";
this.Body = 807;
this.BaseSoundID = 959;
this.Hue = 0x453;
this.SetStr(296, 320);
this.SetDex(121, 145);
this.SetInt(76, 100);
this.SetHits(151, 162);
this.SetDamage(10, 15);
this.SetDamageType(ResistanceType.Physical, 70);
this.SetDamageType(ResistanceType.Poison, 30);
this.SetResistance(ResistanceType.Physical, 30, 40);
this.SetResistance(ResistanceType.Fire, 30, 35);
this.SetResistance(ResistanceType.Cold, 25, 35);
this.SetResistance(ResistanceType.Poison, 35, 40);
this.SetResistance(ResistanceType.Energy, 25, 30);
this.SetSkill(SkillName.MagicResist, 70.0);
this.SetSkill(SkillName.Tactics, 90.0);
this.SetSkill(SkillName.Wrestling, 90.0);
this.Fame = 4500;
this.Karma = -4500;
this.VirtualArmor = 45;
SolenHelper.PackPicnicBasket(this);
this.PackItem(new ZoogiFungus((Utility.RandomDouble() > 0.05) ? 5 : 25));
if (Utility.RandomDouble() < 0.05)
this.PackItem(new BallOfSummoning());
}
public BlackSolenQueen(Serial serial)
: base(serial)
{
}
public bool BurstSac
{
get
{
return this.m_BurstSac;
}
}
public override int GetAngerSound()
{
return 0x259;
}
public override int GetIdleSound()
{
return 0x259;
}
public override int GetAttackSound()
{
return 0x195;
}
public override int GetHurtSound()
{
return 0x250;
}
public override int GetDeathSound()
{
return 0x25B;
}
public override void GenerateLoot()
{
this.AddLoot(LootPack.Rich);
}
public override void OnGotMeleeAttack(Mobile attacker)
{
if (attacker.Weapon is BaseRanged)
BeginAcidBreath();
else if (this.Map != null && attacker != this && m_Laid == false && 0.20 > Utility.RandomDouble())
{
BSQEggSac sac = new BSQEggSac();
sac.MoveToWorld(this.Location, this.Map);
PlaySound(0x582);
Say(1114445); // * * The solen queen summons her workers to her aid! * *
m_Laid = true;
EggSacTimer e = new EggSacTimer();
e.Start();
}
base.OnGotMeleeAttack(attacker);
}
public override void OnDamagedBySpell(Mobile attacker)
{
base.OnDamagedBySpell(attacker);
if (0.80 >= Utility.RandomDouble())
BeginAcidBreath();
}
#region Acid Breath
private DateTime m_NextAcidBreath;
public void BeginAcidBreath()
{
PlayerMobile m = Combatant as PlayerMobile;
if (m == null || m.Deleted || !m.Alive || !Alive || m_NextAcidBreath > DateTime.Now || !CanBeHarmful(m))
return;
PlaySound(0x118);
MovingEffect(m, 0x36D4, 1, 0, false, false, 0x3F, 0);
TimeSpan delay = TimeSpan.FromSeconds(GetDistanceToSqrt(m) / 5.0);
Timer.DelayCall<Mobile>(delay, new TimerStateCallback<Mobile>(EndAcidBreath), m);
m_NextAcidBreath = DateTime.Now + TimeSpan.FromSeconds(5);
}
public void EndAcidBreath(Mobile m)
{
if (m == null || m.Deleted || !m.Alive || !Alive)
return;
if (0.2 >= Utility.RandomDouble())
m.ApplyPoison(this, Poison.Greater);
AOS.Damage(m, Utility.RandomMinMax(100, 120), 0, 0, 0, 100, 0);
}
#endregion
private class EggSacTimer : Timer
{
public EggSacTimer()
: base(TimeSpan.FromSeconds(10))
{
Priority = TimerPriority.OneSecond;
}
protected override void OnTick()
{
m_Laid = false;
}
}
public override bool IsEnemy(Mobile m)
{
if (SolenHelper.CheckBlackFriendship(m))
return false;
else
return base.IsEnemy(m);
}
public override void OnDamage(int amount, Mobile from, bool willKill)
{
SolenHelper.OnBlackDamage(from);
if (!willKill)
{
if (!this.BurstSac)
{
if (this.Hits < 50)
{
this.PublicOverheadMessage(MessageType.Regular, 0x3B2, true, "* The solen's acid sac is burst open! *");
this.m_BurstSac = true;
}
}
else if (from != null && from != this && this.InRange(from, 1))
{
this.SpillAcid(from, 1);
}
}
base.OnDamage(amount, from, willKill);
}
public override bool OnBeforeDeath()
{
this.SpillAcid(4);
return base.OnBeforeDeath();
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)1);
writer.Write(this.m_BurstSac);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
switch( version )
{
case 1:
{
this.m_BurstSac = reader.ReadBool();
break;
}
}
}
}
public class BSQEggSac : Item, ICarvable
{
private SpawnTimer m_Timer;
public override string DefaultName
{
get { return "egg sac"; }
}
[Constructable]
public BSQEggSac()
: base(4316)
{
Movable = false;
Hue = 350;
m_Timer = new SpawnTimer(this);
m_Timer.Start();
}
public bool Carve(Mobile from, Item item)
{
Effects.PlaySound(GetWorldLocation(), Map, 0x027);
Effects.SendLocationEffect(GetWorldLocation(), Map, 0x3728, 10, 10, 0, 0);
from.SendMessage("You destroy the egg sac.");
Delete();
m_Timer.Stop();
return true;
}
public BSQEggSac(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
m_Timer = new SpawnTimer(this);
m_Timer.Start();
}
private class SpawnTimer : Timer
{
private Item m_Item;
public SpawnTimer(Item item)
: base(TimeSpan.FromSeconds(Utility.RandomMinMax(5, 10)))
{
Priority = TimerPriority.FiftyMS;
m_Item = item;
}
protected override void OnTick()
{
if (m_Item.Deleted)
return;
Mobile spawn;
switch (Utility.Random(2))
{
case 0:
spawn = new BlackSolenWarrior();
spawn.MoveToWorld(m_Item.Location, m_Item.Map);
m_Item.Delete();
break;
case 1:
spawn = new BlackSolenWorker();
spawn.MoveToWorld(m_Item.Location, m_Item.Map);
m_Item.Delete();
break;
}
}
}
}
}

View File

@@ -0,0 +1,204 @@
using System;
using Server.Items;
using Server.Network;
namespace Server.Mobiles
{
[CorpseName("a solen warrior corpse")]
public class BlackSolenWarrior : BaseCreature, IBlackSolen
{
private bool m_BurstSac;
[Constructable]
public BlackSolenWarrior()
: base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
{
this.Name = "a black solen warrior";
this.Body = 806;
this.BaseSoundID = 959;
this.Hue = 0x453;
this.SetStr(196, 220);
this.SetDex(101, 125);
this.SetInt(36, 60);
this.SetHits(96, 107);
this.SetDamage(5, 15);
this.SetDamageType(ResistanceType.Physical, 80);
this.SetDamageType(ResistanceType.Poison, 20);
this.SetResistance(ResistanceType.Physical, 20, 35);
this.SetResistance(ResistanceType.Fire, 20, 35);
this.SetResistance(ResistanceType.Cold, 10, 25);
this.SetResistance(ResistanceType.Poison, 20, 35);
this.SetResistance(ResistanceType.Energy, 10, 25);
this.SetSkill(SkillName.MagicResist, 60.0);
this.SetSkill(SkillName.Tactics, 80.0);
this.SetSkill(SkillName.Wrestling, 80.0);
this.Fame = 3000;
this.Karma = -3000;
this.VirtualArmor = 35;
SolenHelper.PackPicnicBasket(this);
this.PackItem(new ZoogiFungus((0.05 > Utility.RandomDouble()) ? 13 : 3));
if (Utility.RandomDouble() < 0.05)
this.PackItem(new BraceletOfBinding());
}
public BlackSolenWarrior(Serial serial)
: base(serial)
{
}
public override void OnGotMeleeAttack(Mobile attacker)
{
if (attacker.Weapon is BaseRanged)
BeginAcidBreath();
base.OnGotMeleeAttack(attacker);
}
public override void OnDamagedBySpell(Mobile attacker)
{
base.OnDamagedBySpell(attacker);
BeginAcidBreath();
}
#region Acid Breath
private DateTime m_NextAcidBreath;
public void BeginAcidBreath()
{
PlayerMobile m = Combatant as PlayerMobile;
// Mobile m = Combatant;
if (m == null || m.Deleted || !m.Alive || !Alive || m_NextAcidBreath > DateTime.Now || !CanBeHarmful(m))
return;
PlaySound(0x118);
MovingEffect(m, 0x36D4, 1, 0, false, false, 0x3F, 0);
TimeSpan delay = TimeSpan.FromSeconds(GetDistanceToSqrt(m) / 5.0);
Timer.DelayCall<Mobile>(delay, new TimerStateCallback<Mobile>(EndAcidBreath), m);
m_NextAcidBreath = DateTime.Now + TimeSpan.FromSeconds(5);
}
public void EndAcidBreath(Mobile m)
{
if (m == null || m.Deleted || !m.Alive || !Alive)
return;
if (0.2 >= Utility.RandomDouble())
m.ApplyPoison(this, Poison.Greater);
AOS.Damage(m, Utility.RandomMinMax(100, 120), 0, 0, 0, 100, 0);
}
#endregion
public bool BurstSac
{
get
{
return this.m_BurstSac;
}
}
public override int GetAngerSound()
{
return 0xB5;
}
public override int GetIdleSound()
{
return 0xB5;
}
public override int GetAttackSound()
{
return 0x289;
}
public override int GetHurtSound()
{
return 0xBC;
}
public override int GetDeathSound()
{
return 0xE4;
}
public override void GenerateLoot()
{
this.AddLoot(LootPack.Rich);
this.AddLoot(LootPack.Gems, Utility.RandomMinMax(1, 4));
}
public override bool IsEnemy(Mobile m)
{
if (SolenHelper.CheckBlackFriendship(m))
return false;
else
return base.IsEnemy(m);
}
public override void OnDamage(int amount, Mobile from, bool willKill)
{
SolenHelper.OnBlackDamage(from);
if (!willKill)
{
if (!this.BurstSac)
{
if (this.Hits < 50)
{
this.PublicOverheadMessage(MessageType.Regular, 0x3B2, true, "* The solen's acid sac is burst open! *");
this.m_BurstSac = true;
}
}
else if (from != null && from != this && this.InRange(from, 1))
{
this.SpillAcid(from, 1);
}
}
base.OnDamage(amount, from, willKill);
}
public override bool OnBeforeDeath()
{
this.SpillAcid(4);
return base.OnBeforeDeath();
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)1);
writer.Write(this.m_BurstSac);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
switch( version )
{
case 1:
{
this.m_BurstSac = reader.ReadBool();
break;
}
}
}
}
}

View File

@@ -0,0 +1,112 @@
using System;
using Server.Items;
namespace Server.Mobiles
{
[CorpseName("a solen worker corpse")]
public class BlackSolenWorker : BaseCreature, IBlackSolen
{
[Constructable]
public BlackSolenWorker()
: base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
{
this.Name = "a black solen worker";
this.Body = 805;
this.BaseSoundID = 959;
this.Hue = 0x453;
this.SetStr(96, 120);
this.SetDex(81, 105);
this.SetInt(36, 60);
this.SetHits(58, 72);
this.SetDamage(5, 7);
this.SetDamageType(ResistanceType.Physical, 100);
this.SetResistance(ResistanceType.Physical, 25, 30);
this.SetResistance(ResistanceType.Fire, 20, 30);
this.SetResistance(ResistanceType.Cold, 10, 20);
this.SetResistance(ResistanceType.Poison, 10, 20);
this.SetResistance(ResistanceType.Energy, 20, 30);
this.SetSkill(SkillName.MagicResist, 60.0);
this.SetSkill(SkillName.Tactics, 65.0);
this.SetSkill(SkillName.Wrestling, 60.0);
this.Fame = 1500;
this.Karma = -1500;
this.VirtualArmor = 28;
this.PackGold(Utility.Random(100, 180));
SolenHelper.PackPicnicBasket(this);
this.PackItem(new ZoogiFungus());
}
public BlackSolenWorker(Serial serial)
: base(serial)
{
}
public override int GetAngerSound()
{
return 0x269;
}
public override int GetIdleSound()
{
return 0x269;
}
public override int GetAttackSound()
{
return 0x186;
}
public override int GetHurtSound()
{
return 0x1BE;
}
public override int GetDeathSound()
{
return 0x8E;
}
public override void GenerateLoot()
{
this.AddLoot(LootPack.Gems, Utility.RandomMinMax(1, 2));
}
public override bool IsEnemy(Mobile m)
{
if (SolenHelper.CheckBlackFriendship(m))
return false;
else
return base.IsEnemy(m);
}
public override void OnDamage(int amount, Mobile from, bool willKill)
{
SolenHelper.OnBlackDamage(from);
base.OnDamage(amount, from, willKill);
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}

View File

@@ -0,0 +1,77 @@
using System;
namespace Server.Mobiles
{
[CorpseName("a blood elemental corpse")]
public class BloodElemental : BaseCreature, IBloodCreature
{
[Constructable]
public BloodElemental()
: base(AIType.AI_Mage, FightMode.Closest, 10, 1, 0.2, 0.4)
{
this.Name = "a blood elemental";
this.Body = 159;
this.BaseSoundID = 278;
this.SetStr(526, 615);
this.SetDex(66, 85);
this.SetInt(226, 350);
this.SetHits(316, 369);
this.SetDamage(17, 27);
this.SetDamageType(ResistanceType.Physical, 0);
this.SetDamageType(ResistanceType.Poison, 50);
this.SetDamageType(ResistanceType.Energy, 50);
this.SetResistance(ResistanceType.Physical, 55, 65);
this.SetResistance(ResistanceType.Fire, 20, 30);
this.SetResistance(ResistanceType.Cold, 40, 50);
this.SetResistance(ResistanceType.Poison, 50, 60);
this.SetResistance(ResistanceType.Energy, 30, 40);
this.SetSkill(SkillName.EvalInt, 85.1, 100.0);
this.SetSkill(SkillName.Magery, 85.1, 100.0);
this.SetSkill(SkillName.Meditation, 10.4, 50.0);
this.SetSkill(SkillName.MagicResist, 80.1, 95.0);
this.SetSkill(SkillName.Tactics, 80.1, 100.0);
this.SetSkill(SkillName.Wrestling, 80.1, 100.0);
this.Fame = 12500;
this.Karma = -12500;
this.VirtualArmor = 60;
}
public BloodElemental(Serial serial)
: base(serial)
{
}
public override int TreasureMapLevel
{
get
{
return 5;
}
}
public override void GenerateLoot()
{
this.AddLoot(LootPack.FilthyRich);
this.AddLoot(LootPack.Rich);
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}

View File

@@ -0,0 +1,72 @@
using System;
using Server.Items;
namespace Server.Mobiles
{
[CorpseName("a blood fox corpse")]
public class BloodFox : BaseCreature
{
[Constructable]
public BloodFox() : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
{
Name = "Blood Fox";
Body = 0x58f;
Female = true;
SetStr(300, 320);
SetDex(190, 200);
SetInt(170, 210);
SetHits(190, 200);
SetDamage(16, 22);
SetDamageType(ResistanceType.Physical, 100);
SetResistance(ResistanceType.Physical, 50, 60);
SetResistance(ResistanceType.Fire, 20, 30);
SetResistance(ResistanceType.Cold, 55, 65);
SetResistance(ResistanceType.Poison, 25, 35);
SetResistance(ResistanceType.Energy, 35);
SetSkill(SkillName.MagicResist, 40.0, 50.0);
SetSkill(SkillName.Tactics, 50.0, 70.0);
SetSkill(SkillName.Wrestling, 75.0, 90.0);
SetSkill(SkillName.DetectHidden, 50.0, 60.0);
Tamable = true;
ControlSlots = 2;
MinTameSkill = 72.0;
SetWeaponAbility(WeaponAbility.BleedAttack);
SetSpecialAbility(SpecialAbility.GraspingClaw);
}
public BloodFox(Serial serial) : base(serial)
{
}
public override int Meat { get { return 5; } }
public override FoodType FavoriteFood { get { return FoodType.Meat; } }
public override bool CanAngerOnTame { get { return true; } }
public override bool StatLossAfterTame { get { return true; } }
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)1); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
if (version == 0)
{
SetSpecialAbility(SpecialAbility.GraspingClaw);
SetWeaponAbility(WeaponAbility.BleedAttack);
}
}
}
}

View File

@@ -0,0 +1,136 @@
using System;
using Server.Items;
using Server.Network;
using System.Collections.Generic;
namespace Server.Mobiles
{
public interface IBloodCreature
{
}
[CorpseName("a bloodworm corpse")]
public class BloodWorm : BaseCreature, IBloodCreature
{
[Constructable]
public BloodWorm()
: base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
{
Name = "a bloodworm";
Body = 287;
SetStr(401, 473);
SetDex(80);
SetInt(18, 19);
SetHits(374, 422);
SetDamage(11, 17);
SetDamageType(ResistanceType.Physical, 60);
SetDamageType(ResistanceType.Poison, 40);
SetResistance(ResistanceType.Physical, 52, 55);
SetResistance(ResistanceType.Fire, 42, 50);
SetResistance(ResistanceType.Cold, 29, 31);
SetResistance(ResistanceType.Poison, 69, 75);
SetResistance(ResistanceType.Energy, 26, 27);
SetSkill(SkillName.MagicResist, 35.0);
SetSkill(SkillName.Tactics, 100.0);
SetSkill(SkillName.Wrestling, 100.0);
SetSpecialAbility(SpecialAbility.Anemia);
}
public BloodWorm(Serial serial)
: base(serial)
{
}
public override void GenerateLoot()
{
AddLoot(LootPack.Rich);
AddLoot(LootPack.Average);
}
public override void OnDeath(Container c)
{
base.OnDeath(c);
if (Utility.RandomDouble() < 0.02)
c.DropItem(new LuckyCoin());
}
public override int GetIdleSound()
{
return 1503;
}
public override int GetAngerSound()
{
return 1500;
}
public override int GetHurtSound()
{
return 1502;
}
public override int GetDeathSound()
{
return 1501;
}
public override void OnAfterMove(Point3D oldLocation)
{
base.OnAfterMove(oldLocation);
if (Hits < HitsMax && 0.25 > Utility.RandomDouble())
{
Corpse toAbsorb = null;
foreach (Item item in Map.GetItemsInRange(Location, 1))
{
if (item is Corpse)
{
Corpse c = (Corpse)item;
if (c.ItemID == 0x2006)
{
toAbsorb = c;
break;
}
}
}
if (toAbsorb != null)
{
toAbsorb.ProcessDelta();
toAbsorb.SendRemovePacket();
toAbsorb.ItemID = Utility.Random(0xECA, 9); // bone graphic
toAbsorb.Hue = 0;
toAbsorb.Direction = Direction.North;
toAbsorb.ProcessDelta();
Hits = HitsMax;
// * The creature drains blood from a nearby corpse to heal itself. *
PublicOverheadMessage(MessageType.Regular, 0x3B2, 1111699);
}
}
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}

View File

@@ -0,0 +1,78 @@
using System;
namespace Server.Mobiles
{
[CorpseName("a pig corpse")]
public class Boar : BaseCreature
{
[Constructable]
public Boar()
: base(AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
{
this.Name = "a boar";
this.Body = 0x122;
this.BaseSoundID = 0xC4;
this.SetStr(25);
this.SetDex(15);
this.SetInt(5);
this.SetHits(15);
this.SetMana(0);
this.SetDamage(3, 6);
this.SetDamageType(ResistanceType.Physical, 100);
this.SetResistance(ResistanceType.Physical, 10, 15);
this.SetResistance(ResistanceType.Fire, 5, 10);
this.SetResistance(ResistanceType.Poison, 5, 10);
this.SetSkill(SkillName.MagicResist, 9.0);
this.SetSkill(SkillName.Tactics, 9.0);
this.SetSkill(SkillName.Wrestling, 9.0);
this.Fame = 300;
this.Karma = 0;
this.VirtualArmor = 10;
this.Tamable = true;
this.ControlSlots = 1;
this.MinTameSkill = 29.1;
}
public Boar(Serial serial)
: base(serial)
{
}
public override int Meat
{
get
{
return 2;
}
}
public override FoodType FavoriteFood
{
get
{
return FoodType.FruitsAndVegies | FoodType.GrainsAndHay;
}
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}

View File

@@ -0,0 +1,159 @@
using System;
using System.Collections;
using Server.Items;
namespace Server.Mobiles
{
[CorpseName("a plant corpse")]
public class BogThing : BaseCreature
{
[Constructable]
public BogThing()
: base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.6, 1.2)
{
this.Name = "a bog thing";
this.Body = 780;
this.SetStr(801, 900);
this.SetDex(46, 65);
this.SetInt(36, 50);
this.SetHits(481, 540);
this.SetMana(0);
this.SetDamage(10, 23);
this.SetDamageType(ResistanceType.Physical, 60);
this.SetDamageType(ResistanceType.Poison, 40);
this.SetResistance(ResistanceType.Physical, 30, 40);
this.SetResistance(ResistanceType.Fire, 20, 25);
this.SetResistance(ResistanceType.Cold, 10, 15);
this.SetResistance(ResistanceType.Poison, 40, 50);
this.SetResistance(ResistanceType.Energy, 20, 25);
this.SetSkill(SkillName.MagicResist, 90.1, 95.0);
this.SetSkill(SkillName.Tactics, 70.1, 85.0);
this.SetSkill(SkillName.Wrestling, 65.1, 80.0);
this.Fame = 8000;
this.Karma = -8000;
this.VirtualArmor = 28;
if (0.25 > Utility.RandomDouble())
this.PackItem(new Board(10));
else
this.PackItem(new Log(10));
this.PackReg(3);
this.PackItem(new Engines.Plants.Seed());
this.PackItem(new Engines.Plants.Seed());
}
public BogThing(Serial serial)
: base(serial)
{
}
public override bool BardImmune
{
get
{
return !Core.AOS;
}
}
public override Poison PoisonImmune
{
get
{
return Poison.Lethal;
}
}
public override void GenerateLoot()
{
this.AddLoot(LootPack.Average, 2);
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
public void SpawnBogling(Mobile m)
{
Map map = this.Map;
if (map == null)
return;
Bogling spawned = new Bogling();
spawned.Team = this.Team;
bool validLocation = false;
Point3D loc = this.Location;
for (int j = 0; !validLocation && j < 10; ++j)
{
int x = this.X + Utility.Random(3) - 1;
int y = this.Y + Utility.Random(3) - 1;
int z = map.GetAverageZ(x, y);
if (validLocation = map.CanFit(x, y, this.Z, 16, false, false))
loc = new Point3D(x, y, this.Z);
else if (validLocation = map.CanFit(x, y, z, 16, false, false))
loc = new Point3D(x, y, z);
}
spawned.MoveToWorld(loc, map);
spawned.Combatant = m;
}
public void EatBoglings()
{
ArrayList toEat = new ArrayList();
IPooledEnumerable eable = GetMobilesInRange(2);
foreach (Mobile m in eable)
{
if (m is Bogling)
toEat.Add(m);
}
eable.Free();
if (toEat.Count > 0)
{
this.PlaySound(Utility.Random(0x3B, 2)); // Eat sound
foreach (Mobile m in toEat)
{
this.Hits += (m.Hits / 2);
m.Delete();
}
}
}
public override void OnGotMeleeAttack(Mobile attacker)
{
base.OnGotMeleeAttack(attacker);
if (this.Hits > (this.HitsMax / 4))
{
if (0.25 >= Utility.RandomDouble())
this.SpawnBogling(attacker);
}
else if (0.25 >= Utility.RandomDouble())
{
this.EatBoglings();
}
}
}
}

View File

@@ -0,0 +1,85 @@
using System;
using Server.Items;
namespace Server.Mobiles
{
[CorpseName("a ghostly corpse")]
public class Bogle : BaseCreature
{
[Constructable]
public Bogle()
: base(AIType.AI_Mage, FightMode.Closest, 10, 1, 0.2, 0.4)
{
this.Name = "a bogle";
this.Body = 153;
this.BaseSoundID = 0x482;
this.SetStr(76, 100);
this.SetDex(76, 95);
this.SetInt(36, 60);
this.SetHits(46, 60);
this.SetDamage(7, 11);
this.SetSkill(SkillName.EvalInt, 55.1, 70.0);
this.SetSkill(SkillName.Magery, 55.1, 70.0);
this.SetSkill(SkillName.MagicResist, 55.1, 70.0);
this.SetSkill(SkillName.Tactics, 45.1, 60.0);
this.SetSkill(SkillName.Wrestling, 45.1, 55.0);
this.Fame = 4000;
this.Karma = -4000;
this.VirtualArmor = 28;
this.PackItem(Loot.RandomWeapon());
this.PackItem(new Bone());
}
public Bogle(Serial serial)
: base(serial)
{
}
public override bool BleedImmune
{
get
{
return true;
}
}
public override Poison PoisonImmune
{
get
{
return Poison.Lethal;
}
}
public override TribeType Tribe { get { return TribeType.Undead; } }
public override OppositionGroup OppositionGroup
{
get
{
return OppositionGroup.FeyAndUndead;
}
}
public override void GenerateLoot()
{
this.AddLoot(LootPack.Meager);
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}

View File

@@ -0,0 +1,82 @@
using System;
using Server.Items;
namespace Server.Mobiles
{
[CorpseName("a plant corpse")]
public class Bogling : BaseCreature
{
[Constructable]
public Bogling()
: base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
{
Name = "a bogling";
Body = 779;
BaseSoundID = 422;
SetStr(96, 120);
SetDex(91, 115);
SetInt(21, 45);
SetHits(58, 72);
SetDamage(5, 7);
SetDamageType(ResistanceType.Physical, 100);
SetResistance(ResistanceType.Physical, 20, 25);
SetResistance(ResistanceType.Fire, 10, 20);
SetResistance(ResistanceType.Cold, 15, 25);
SetResistance(ResistanceType.Poison, 15, 25);
SetResistance(ResistanceType.Energy, 15, 25);
SetSkill(SkillName.MagicResist, 75.1, 100.0);
SetSkill(SkillName.Tactics, 55.1, 80.0);
SetSkill(SkillName.Wrestling, 55.1, 75.0);
Fame = 450;
Karma = -450;
VirtualArmor = 28;
PackItem(new Log(4));
PackItem(new Engines.Plants.Seed());
}
public Bogling(Serial serial)
: base(serial)
{
}
public override int Hides
{
get
{
return 6;
}
}
public override int Meat
{
get
{
return 1;
}
}
public override void GenerateLoot()
{
AddLoot(LootPack.Meager);
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}

View File

@@ -0,0 +1,104 @@
using System;
namespace Server.Mobiles
{
[CorpseName("a bone demon corpse")]
public class BoneDemon : BaseCreature
{
[Constructable]
public BoneDemon()
: base(AIType.AI_Mage, FightMode.Closest, 10, 1, 0.2, 0.4)
{
Name = "a bone demon";
Body = 308;
BaseSoundID = 0x48D;
SetStr(1000);
SetDex(151, 175);
SetInt(171, 220);
SetHits(3600);
SetDamage(34, 36);
SetDamageType(ResistanceType.Physical, 50);
SetDamageType(ResistanceType.Cold, 50);
SetResistance(ResistanceType.Physical, 75);
SetResistance(ResistanceType.Fire, 60);
SetResistance(ResistanceType.Cold, 90);
SetResistance(ResistanceType.Poison, 100);
SetResistance(ResistanceType.Energy, 60);
SetSkill(SkillName.Wrestling, 100.0);
SetSkill(SkillName.Tactics, 100.0);
SetSkill(SkillName.MagicResist, 50.1, 75.0);
SetSkill(SkillName.DetectHidden, 100.0);
SetSkill(SkillName.Magery, 77.6, 87.5);
SetSkill(SkillName.EvalInt, 77.6, 87.5);
SetSkill(SkillName.Meditation, 100.0);
Fame = 20000;
Karma = -20000;
VirtualArmor = 44;
}
public BoneDemon(Serial serial)
: base(serial)
{
}
public override bool BardImmune
{
get
{
return !Core.SE;
}
}
public override bool Unprovokable
{
get
{
return Core.SE;
}
}
public override bool AreaPeaceImmune
{
get
{
return Core.SE;
}
}
public override Poison PoisonImmune
{
get
{
return Poison.Lethal;
}
}
public override int TreasureMapLevel
{
get
{
return 1;
}
}
public override void GenerateLoot()
{
AddLoot(LootPack.FilthyRich, 8);
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}

View File

@@ -0,0 +1,109 @@
using System;
using Server.Items;
namespace Server.Mobiles
{
[CorpseName("a skeletal corpse")]
public class BoneKnight : BaseCreature
{
[Constructable]
public BoneKnight()
: base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
{
this.Name = "a bone knight";
this.Body = 57;
this.BaseSoundID = 451;
this.SetStr(196, 250);
this.SetDex(76, 95);
this.SetInt(36, 60);
this.SetHits(118, 150);
this.SetDamage(8, 18);
this.SetDamageType(ResistanceType.Physical, 40);
this.SetDamageType(ResistanceType.Cold, 60);
this.SetResistance(ResistanceType.Physical, 35, 45);
this.SetResistance(ResistanceType.Fire, 20, 30);
this.SetResistance(ResistanceType.Cold, 50, 60);
this.SetResistance(ResistanceType.Poison, 20, 30);
this.SetResistance(ResistanceType.Energy, 30, 40);
this.SetSkill(SkillName.MagicResist, 65.1, 80.0);
this.SetSkill(SkillName.Tactics, 85.1, 100.0);
this.SetSkill(SkillName.Wrestling, 85.1, 95.0);
this.Fame = 3000;
this.Karma = -3000;
this.VirtualArmor = 40;
switch ( Utility.Random(6) )
{
case 0:
this.PackItem(new PlateArms());
break;
case 1:
this.PackItem(new PlateChest());
break;
case 2:
this.PackItem(new PlateGloves());
break;
case 3:
this.PackItem(new PlateGorget());
break;
case 4:
this.PackItem(new PlateLegs());
break;
case 5:
this.PackItem(new PlateHelm());
break;
}
this.PackItem(new Scimitar());
this.PackItem(new WoodenShield());
}
public BoneKnight(Serial serial)
: base(serial)
{
}
public override bool BleedImmune
{
get
{
return true;
}
}
public override TribeType Tribe { get { return TribeType.Undead; } }
public override OppositionGroup OppositionGroup
{
get
{
return OppositionGroup.FeyAndUndead;
}
}
public override void GenerateLoot()
{
this.AddLoot(LootPack.Average);
this.AddLoot(LootPack.Meager);
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}

View File

@@ -0,0 +1,80 @@
using System;
using Server.Items;
namespace Server.Mobiles
{
[CorpseName("a skeletal corpse")]
public class BoneMagi : BaseCreature
{
[Constructable]
public BoneMagi()
: base(AIType.AI_NecroMage, FightMode.Closest, 10, 1, 0.2, 0.4)
{
Name = "a bone mage";
Body = 148;
BaseSoundID = 451;
SetStr(76, 100);
SetDex(56, 75);
SetInt(186, 210);
SetHits(46, 60);
SetDamage(3, 7);
SetDamageType(ResistanceType.Physical, 100);
SetResistance(ResistanceType.Physical, 35, 40);
SetResistance(ResistanceType.Fire, 20, 30);
SetResistance(ResistanceType.Cold, 50, 60);
SetResistance(ResistanceType.Poison, 20, 30);
SetResistance(ResistanceType.Energy, 30, 40);
SetSkill(SkillName.EvalInt, 60.1, 70.0);
SetSkill(SkillName.Magery, 60.1, 70.0);
SetSkill(SkillName.MagicResist, 55.1, 70.0);
SetSkill(SkillName.Tactics, 45.1, 60.0);
SetSkill(SkillName.Wrestling, 45.1, 55.0);
SetSkill(SkillName.Necromancy, 89, 99.1);
SetSkill(SkillName.SpiritSpeak, 90.0, 99.0);
Fame = 3000;
Karma = -3000;
VirtualArmor = 38;
PackReg(3);
PackNecroReg(3, 10);
PackItem(new Bone());
}
public BoneMagi(Serial serial)
: base(serial)
{
}
public override bool BleedImmune { get { return true; } }
public override OppositionGroup OppositionGroup { get { return OppositionGroup.FeyAndUndead; } }
public override Poison PoisonImmune { get { return Poison.Regular; } }
public override TribeType Tribe { get { return TribeType.Undead; } }
public override void GenerateLoot()
{
AddLoot(LootPack.Average);
AddLoot(LootPack.LowScrolls);
AddLoot(LootPack.Potions);
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}

View File

@@ -0,0 +1,133 @@
using System;
using Server.Items;
namespace Server.Mobiles
{
[TypeAlias("Server.Mobiles.HumanBrigand")]
public class Brigand : BaseCreature
{
[Constructable]
public Brigand()
: base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
{
SpeechHue = Utility.RandomDyedHue();
Title = "the brigand";
Hue = Utility.RandomSkinHue();
if (Female = Utility.RandomBool())
{
Body = 0x191;
Name = NameList.RandomName("female");
AddItem(new Skirt(Utility.RandomNeutralHue()));
}
else
{
Body = 0x190;
Name = NameList.RandomName("male");
AddItem(new ShortPants(Utility.RandomNeutralHue()));
}
SetStr(86, 100);
SetDex(81, 95);
SetInt(61, 75);
SetDamage(10, 23);
SetSkill(SkillName.Fencing, 66.0, 97.5);
SetSkill(SkillName.Macing, 65.0, 87.5);
SetSkill(SkillName.MagicResist, 25.0, 47.5);
SetSkill(SkillName.Swords, 65.0, 87.5);
SetSkill(SkillName.Tactics, 65.0, 87.5);
SetSkill(SkillName.Wrestling, 15.0, 37.5);
Fame = 1000;
Karma = -1000;
AddItem(new Boots(Utility.RandomNeutralHue()));
AddItem(new FancyShirt());
AddItem(new Bandana());
switch ( Utility.Random(7))
{
case 0:
AddItem(new Longsword());
break;
case 1:
AddItem(new Cutlass());
break;
case 2:
AddItem(new Broadsword());
break;
case 3:
AddItem(new Axe());
break;
case 4:
AddItem(new Club());
break;
case 5:
AddItem(new Dagger());
break;
case 6:
AddItem(new Spear());
break;
}
Utility.AssignRandomHair(this);
}
public Brigand(Serial serial)
: base(serial)
{
}
public override bool ClickTitle
{
get
{
return false;
}
}
public override bool AlwaysMurderer
{
get
{
return true;
}
}
public override bool ShowFameTitle
{
get
{
return false;
}
}
public override void OnDeath(Container c)
{
base.OnDeath(c);
if (Utility.RandomDouble() < 0.75)
c.DropItem(new SeveredHumanEars());
}
public override void GenerateLoot()
{
AddLoot(LootPack.Average);
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}

View File

@@ -0,0 +1,102 @@
using System;
using Server.Items;
namespace Server.Mobiles
{
[CorpseName("an ore elemental corpse")]
public class BronzeElemental : BaseCreature
{
[Constructable]
public BronzeElemental()
: this(25)
{
}
[Constructable]
public BronzeElemental(int oreAmount)
: base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
{
// TODO: Gas attack
Name = "a bronze elemental";
Body = 108;
BaseSoundID = 268;
SetStr(226, 255);
SetDex(126, 145);
SetInt(71, 92);
SetHits(136, 153);
SetDamage(9, 16);
SetDamageType(ResistanceType.Physical, 30);
SetDamageType(ResistanceType.Fire, 70);
SetResistance(ResistanceType.Physical, 30, 40);
SetResistance(ResistanceType.Fire, 30, 40);
SetResistance(ResistanceType.Cold, 10, 20);
SetResistance(ResistanceType.Poison, 70, 80);
SetResistance(ResistanceType.Energy, 20, 30);
SetSkill(SkillName.MagicResist, 50.1, 95.0);
SetSkill(SkillName.Tactics, 60.1, 100.0);
SetSkill(SkillName.Wrestling, 60.1, 100.0);
Fame = 5000;
Karma = -5000;
VirtualArmor = 29;
Item ore = new BronzeOre(oreAmount);
ore.ItemID = 0x19B9;
PackItem(ore);
SetAreaEffect(AreaEffect.PoisonBreath);
}
public BronzeElemental(Serial serial)
: base(serial)
{
}
public override bool BleedImmune
{
get
{
return true;
}
}
public override bool AutoDispel
{
get
{
return true;
}
}
public override int TreasureMapLevel
{
get
{
return 1;
}
}
public override void GenerateLoot()
{
AddLoot(LootPack.Average);
AddLoot(LootPack.Gems, 2);
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}

View File

@@ -0,0 +1,92 @@
using System;
namespace Server.Mobiles
{
[CorpseName("a bear corpse")]
public class BrownBear : BaseCreature
{
[Constructable]
public BrownBear()
: base(AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
{
this.Name = "a brown bear";
this.Body = 167;
this.BaseSoundID = 0xA3;
this.SetStr(76, 100);
this.SetDex(26, 45);
this.SetInt(23, 47);
this.SetHits(46, 60);
this.SetMana(0);
this.SetDamage(6, 12);
this.SetDamageType(ResistanceType.Physical, 100);
this.SetResistance(ResistanceType.Physical, 20, 30);
this.SetResistance(ResistanceType.Cold, 15, 20);
this.SetResistance(ResistanceType.Poison, 10, 15);
this.SetSkill(SkillName.MagicResist, 25.1, 35.0);
this.SetSkill(SkillName.Tactics, 40.1, 60.0);
this.SetSkill(SkillName.Wrestling, 40.1, 60.0);
this.Fame = 450;
this.Karma = 0;
this.VirtualArmor = 24;
this.Tamable = true;
this.ControlSlots = 1;
this.MinTameSkill = 41.1;
}
public BrownBear(Serial serial)
: base(serial)
{
}
public override int Meat
{
get
{
return 1;
}
}
public override int Hides
{
get
{
return 12;
}
}
public override FoodType FavoriteFood
{
get
{
return FoodType.Fish | FoodType.FruitsAndVegies | FoodType.Meat;
}
}
public override PackInstinct PackInstinct
{
get
{
return PackInstinct.Bear;
}
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}

View File

@@ -0,0 +1,79 @@
using System;
namespace Server.Mobiles
{
[CorpseName("a bulbous putrification corpse")]
public class BulbousPutrification : BaseCreature
{
[Constructable]
public BulbousPutrification()
: base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
{
this.Name = "a bulbous putrification";
this.Body = 0x307;
this.Hue = 0x55C;
this.BaseSoundID = 0x165;
this.SetStr(755, 800);
this.SetDex(53, 60);
this.SetInt(51, 59);
this.SetHits(1211, 1231);
this.SetDamage(22, 29);
this.SetDamageType(ResistanceType.Physical, 60);
this.SetDamageType(ResistanceType.Poison, 40);
this.SetResistance(ResistanceType.Physical, 55, 65);
this.SetResistance(ResistanceType.Fire, 40, 50);
this.SetResistance(ResistanceType.Cold, 40, 50);
this.SetResistance(ResistanceType.Poison, 55, 70);
this.SetResistance(ResistanceType.Energy, 50, 60);
this.SetSkill(SkillName.Wrestling, 104.8, 114.7);
this.SetSkill(SkillName.Tactics, 111.9, 119.1);
this.SetSkill(SkillName.MagicResist, 55.5, 64.1);
this.SetSkill(SkillName.Anatomy, 110.0);
this.SetSkill(SkillName.Poisoning, 80.0);
}
public BulbousPutrification(Serial serial)
: base(serial)
{
}
public override Poison PoisonImmune
{
get
{
return Poison.Lethal;
}
}
public override Poison HitPoison
{
get
{
return Poison.Lethal;
}
}
public override void GenerateLoot()
{
this.AddLoot(LootPack.AosFilthyRich, 5);
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}

View File

@@ -0,0 +1,94 @@
using System;
namespace Server.Mobiles
{
[CorpseName("a bull corpse")]
public class Bull : BaseCreature
{
[Constructable]
public Bull()
: base(AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
{
this.Name = "a bull";
this.Body = Utility.RandomList(0xE8, 0xE9);
this.BaseSoundID = 0x64;
if (0.5 >= Utility.RandomDouble())
this.Hue = 0x901;
this.SetStr(77, 111);
this.SetDex(56, 75);
this.SetInt(47, 75);
this.SetHits(50, 64);
this.SetMana(0);
this.SetDamage(4, 9);
this.SetDamageType(ResistanceType.Physical, 100);
this.SetResistance(ResistanceType.Physical, 25, 30);
this.SetResistance(ResistanceType.Cold, 10, 15);
this.SetSkill(SkillName.MagicResist, 17.6, 25.0);
this.SetSkill(SkillName.Tactics, 67.6, 85.0);
this.SetSkill(SkillName.Wrestling, 40.1, 57.5);
this.Fame = 600;
this.Karma = 0;
this.VirtualArmor = 28;
this.Tamable = true;
this.ControlSlots = 1;
this.MinTameSkill = 71.1;
}
public Bull(Serial serial)
: base(serial)
{
}
public override int Meat
{
get
{
return 10;
}
}
public override int Hides
{
get
{
return 15;
}
}
public override FoodType FavoriteFood
{
get
{
return FoodType.GrainsAndHay;
}
}
public override PackInstinct PackInstinct
{
get
{
return PackInstinct.Bull;
}
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}

View File

@@ -0,0 +1,90 @@
using System;
namespace Server.Mobiles
{
[CorpseName("a bull frog corpse")]
[TypeAlias("Server.Mobiles.Bullfrog")]
public class BullFrog : BaseCreature
{
[Constructable]
public BullFrog()
: base(AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
{
Name = "a bull frog";
Body = 81;
Hue = Utility.RandomList(0x5AC, 0x5A3, 0x59A, 0x591, 0x588, 0x57F);
BaseSoundID = 0x266;
SetStr(46, 70);
SetDex(6, 25);
SetInt(11, 20);
SetHits(28, 42);
SetMana(0);
SetDamage(1, 2);
SetDamageType(ResistanceType.Physical, 100);
SetResistance(ResistanceType.Physical, 5, 10);
SetSkill(SkillName.MagicResist, 25.1, 40.0);
SetSkill(SkillName.Tactics, 40.1, 60.0);
SetSkill(SkillName.Wrestling, 40.1, 60.0);
Fame = 350;
Karma = 0;
VirtualArmor = 6;
Tamable = true;
ControlSlots = 1;
MinTameSkill = 23.1;
}
public BullFrog(Serial serial)
: base(serial)
{
}
public override int Meat
{
get
{
return 1;
}
}
public override int Hides
{
get
{
return 4;
}
}
public override FoodType FavoriteFood
{
get
{
return FoodType.Fish | FoodType.Meat;
}
}
public override void GenerateLoot()
{
AddLoot(LootPack.Poor);
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}

View File

@@ -0,0 +1,44 @@
using System;
namespace Server.Mobiles
{
public class CapturedHordeMinion : HordeMinion
{
[Constructable]
public CapturedHordeMinion()
{
this.FightMode = FightMode.None;
}
public CapturedHordeMinion(Serial serial)
: base(serial)
{
}
public override bool InitialInnocent
{
get
{
return true;
}
}
public override bool CanBeDamaged()
{
return false;
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.WriteEncodedInt(0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadEncodedInt();
}
}
}

View File

@@ -0,0 +1,86 @@
using System;
namespace Server.Mobiles
{
[CorpseName("a cat corpse")]
[TypeAlias("Server.Mobiles.Housecat")]
public class Cat : BaseCreature
{
[Constructable]
public Cat()
: base(AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
{
this.Name = "a cat";
this.Body = 0xC9;
this.Hue = Utility.RandomAnimalHue();
this.BaseSoundID = 0x69;
this.SetStr(9);
this.SetDex(35);
this.SetInt(5);
this.SetHits(6);
this.SetMana(0);
this.SetDamage(1);
this.SetDamageType(ResistanceType.Physical, 100);
this.SetResistance(ResistanceType.Physical, 5, 10);
this.SetSkill(SkillName.MagicResist, 5.0);
this.SetSkill(SkillName.Tactics, 4.0);
this.SetSkill(SkillName.Wrestling, 5.0);
this.SetSkill(SkillName.Hiding, 20.0);
this.Fame = 0;
this.Karma = 150;
this.VirtualArmor = 8;
this.Tamable = true;
this.ControlSlots = 1;
this.MinTameSkill = -0.9;
}
public Cat(Serial serial)
: base(serial)
{
}
public override int Meat
{
get
{
return 1;
}
}
public override FoodType FavoriteFood
{
get
{
return FoodType.Meat | FoodType.Fish;
}
}
public override PackInstinct PackInstinct
{
get
{
return PackInstinct.Feline;
}
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}

View File

@@ -0,0 +1,101 @@
using System;
using Server.Items;
namespace Server.Mobiles
{
[CorpseName("a centaur corpse")]
public class Centaur : BaseCreature
{
[Constructable]
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 TribeType Tribe { get { return TribeType.Fey; } }
public override OppositionGroup OppositionGroup
{
get
{
return OppositionGroup.FeyAndUndead;
}
}
public override int Meat
{
get
{
return 1;
}
}
public override int Hides
{
get
{
return 8;
}
}
public override HideType HideType
{
get
{
return 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((int)0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}

View File

@@ -0,0 +1,347 @@
using System;
using Server.Items;
using Server.Spells;
namespace Server.Mobiles
{
[CorpseName("a changeling corpse")]
public class Changeling : BaseCreature
{
private static readonly int[] m_FireNorth = new int[]
{
-1, -1,
1, -1,
-1, 2,
1, 2
};
private static readonly int[] m_FireEast = new int[]
{
-1, 0,
2, 0
};
private Mobile m_MorphedInto;
private DateTime m_LastMorph;
[Constructable]
public Changeling()
: base(AIType.AI_Spellweaving, FightMode.Closest, 10, 1, 0.2, 0.4)
{
Name = DefaultName;
Body = 264;
Hue = DefaultHue;
SetStr(36, 105);
SetDex(212, 262);
SetInt(317, 399);
SetHits(201, 211);
SetStam(212, 262);
SetMana(317, 399);
SetDamage(9, 15);
SetDamageType(ResistanceType.Physical, 100);
SetResistance(ResistanceType.Physical, 81, 90);
SetResistance(ResistanceType.Fire, 40, 50);
SetResistance(ResistanceType.Cold, 40, 49);
SetResistance(ResistanceType.Poison, 40, 50);
SetResistance(ResistanceType.Energy, 43, 50);
SetSkill(SkillName.Wrestling, 10.4, 12.5);
SetSkill(SkillName.Tactics, 101.1, 108.3);
SetSkill(SkillName.MagicResist, 121.6, 132.2);
SetSkill(SkillName.Magery, 91.6, 99.5);
SetSkill(SkillName.EvalInt, 91.5, 98.8);
SetSkill(SkillName.Meditation, 91.7, 98.5);
SetSkill(SkillName.Spellweaving, 91.6, 99.5);
Fame = 15000;
Karma = -15000;
PackItem(new Arrow(35));
PackItem(new Bolt(25));
PackGem(2);
for (int i = 0; i < Utility.RandomMinMax(0, 1); i++)
{
PackItem(Loot.RandomScroll(0, Loot.ArcanistScrollTypes.Length, SpellbookType.Arcanist));
}
}
public Changeling(Serial serial)
: base(serial)
{
}
public override bool IsEnemy(Mobile m)
{
if (m is BaseCreature && ((BaseCreature)m).IsMonster && m.Karma > 0)
{
return true;
}
return base.IsEnemy(m);
}
public virtual string DefaultName
{
get
{
return "a changeling";
}
}
public virtual int DefaultHue
{
get
{
return 0;
}
}
public override bool UseSmartAI { get { return true; } }
public override bool ShowFameTitle
{
get
{
return false;
}
}
public override bool InitialInnocent
{
get
{
return (m_MorphedInto != null);
}
}
[CommandProperty(AccessLevel.GameMaster)]
public Mobile MorphedInto
{
get
{
return m_MorphedInto;
}
set
{
if (value == this)
value = null;
if (m_MorphedInto != value)
{
Revert();
if (value != null)
{
Morph(value);
m_LastMorph = DateTime.UtcNow;
}
m_MorphedInto = value;
Delta(MobileDelta.Noto);
}
}
}
public override void GenerateLoot()
{
AddLoot(LootPack.AosRich, 3);
AddLoot(LootPack.LowScrolls);
AddLoot(LootPack.MedScrolls);
}
public override int GetAngerSound()
{
return 0x46E;
}
public override int GetIdleSound()
{
return 0x470;
}
public override int GetAttackSound()
{
return 0x46D;
}
public override int GetHurtSound()
{
return 0x471;
}
public override int GetDeathSound()
{
return 0x46F;
}
public override void OnThink()
{
base.OnThink();
if (Combatant is PlayerMobile && m_MorphedInto != Combatant && Utility.RandomDouble() < 0.05)
{
MorphedInto = Combatant as Mobile;
}
}
public override bool CheckIdle()
{
bool idle = base.CheckIdle();
if (idle && m_MorphedInto != null && DateTime.UtcNow - m_LastMorph > TimeSpan.FromSeconds(30))
MorphedInto = null;
return idle;
}
public void DeleteClonedItems()
{
for (int i = Items.Count - 1; i >= 0; --i)
{
Item item = Items[i];
if (item is ClonedItem)
item.Delete();
}
if (Backpack != null)
{
for (int i = Backpack.Items.Count - 1; i >= 0; --i)
{
Item item = Backpack.Items[i];
if (item is ClonedItem)
item.Delete();
}
}
}
public override void OnAfterDelete()
{
DeleteClonedItems();
base.OnAfterDelete();
}
public override void ClearHands()
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
writer.Write((m_MorphedInto != null));
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
if (reader.ReadBool())
ValidationQueue<Changeling>.Add(this);
}
public void Validate()
{
Revert();
}
protected virtual void Morph(Mobile m)
{
Body = m.Body;
Hue = m.Hue;
Female = m.Female;
Name = m.Name;
NameHue = m.NameHue;
Title = m.Title;
Kills = m.Kills;
HairItemID = m.HairItemID;
HairHue = m.HairHue;
FacialHairItemID = m.FacialHairItemID;
FacialHairHue = m.FacialHairHue;
// TODO: Skills?
foreach (Item item in m.Items)
{
if (item.Layer != Layer.Backpack && item.Layer != Layer.Mount && item.Layer != Layer.Bank)
AddItem(new ClonedItem(item)); // TODO: Clone weapon/armor attributes
}
PlaySound(0x511);
FixedParticles(0x376A, 1, 14, 5045, EffectLayer.Waist);
}
protected virtual void Revert()
{
Body = 264;
Hue = (IsParagon && DefaultHue == 0) ? Paragon.Hue : DefaultHue;
Female = false;
Name = DefaultName;
NameHue = -1;
Title = null;
Kills = 0;
HairItemID = 0;
HairHue = 0;
FacialHairItemID = 0;
FacialHairHue = 0;
DeleteClonedItems();
PlaySound(0x511);
FixedParticles(0x376A, 1, 14, 5045, EffectLayer.Waist);
}
private void FireEffects(int itemID, int[] offsets)
{
for (int i = 0; i < offsets.Length; i += 2)
{
Point3D p = Location;
p.X += offsets[i];
p.Y += offsets[i + 1];
if (SpellHelper.AdjustField(ref p, Map, 12, false))
Effects.SendLocationEffect(p, Map, itemID, 50);
}
}
private class ClonedItem : Item
{
public ClonedItem(Item item)
: base(item.ItemID)
{
Name = item.Name;
Weight = item.Weight;
Hue = item.Hue;
Layer = item.Layer;
Movable = false;
}
public ClonedItem(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}
}

View File

@@ -0,0 +1,69 @@
using System;
using Server.Items;
namespace Server.Mobiles
{
[CorpseName("a chaos daemon corpse")]
public class ChaosDaemon : BaseCreature
{
[Constructable]
public ChaosDaemon()
: base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
{
Name = "a chaos daemon";
Body = 792;
BaseSoundID = 0x3E9;
SetStr(106, 130);
SetDex(171, 200);
SetInt(56, 80);
SetHits(91, 110);
SetDamage(12, 17);
SetDamageType(ResistanceType.Physical, 85);
SetDamageType(ResistanceType.Fire, 15);
SetResistance(ResistanceType.Physical, 50, 60);
SetResistance(ResistanceType.Fire, 60, 70);
SetResistance(ResistanceType.Cold, 40, 50);
SetResistance(ResistanceType.Poison, 20, 30);
SetResistance(ResistanceType.Energy, 20, 30);
SetSkill(SkillName.MagicResist, 85.1, 95.0);
SetSkill(SkillName.Tactics, 70.1, 80.0);
SetSkill(SkillName.Wrestling, 95.1, 100.0);
Fame = 3000;
Karma = -4000;
VirtualArmor = 15;
SetWeaponAbility(WeaponAbility.CrushingBlow);
}
public ChaosDaemon(Serial serial)
: base(serial)
{
}
public override void GenerateLoot()
{
AddLoot(LootPack.Average);
AddLoot(LootPack.Meager);
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}

View File

@@ -0,0 +1,237 @@
using System;
using Server.Items;
namespace Server.Mobiles
{
[CorpseName("a chaos dragoon corpse")]
public class ChaosDragoon : BaseCreature
{
[Constructable]
public ChaosDragoon()
: base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.15, 0.4)
{
Name = "a chaos dragoon";
Body = 0x190;
Hue = Utility.RandomSkinHue();
SetStr(176, 225);
SetDex(81, 95);
SetInt(61, 85);
SetHits(176, 225);
SetDamage(24, 26);
SetDamageType(ResistanceType.Physical, 25);
SetDamageType(ResistanceType.Fire, 25);
SetDamageType(ResistanceType.Cold, 25);
SetDamageType(ResistanceType.Energy, 25);
SetSkill(SkillName.Fencing, 77.6, 92.5);
SetSkill(SkillName.Healing, 60.3, 90.0);
SetSkill(SkillName.Macing, 77.6, 92.5);
SetSkill(SkillName.Anatomy, 77.6, 87.5);
SetSkill(SkillName.MagicResist, 77.6, 97.5);
SetSkill(SkillName.Swords, 77.6, 92.5);
SetSkill(SkillName.Tactics, 77.6, 87.5);
Fame = 5000;
Karma = -5000;
CraftResource res = CraftResource.None;
switch (Utility.Random(6))
{
case 0:
res = CraftResource.BlackScales;
break;
case 1:
res = CraftResource.RedScales;
break;
case 2:
res = CraftResource.BlueScales;
break;
case 3:
res = CraftResource.YellowScales;
break;
case 4:
res = CraftResource.GreenScales;
break;
case 5:
res = CraftResource.WhiteScales;
break;
}
BaseWeapon melee = null;
switch (Utility.Random(3))
{
case 0:
melee = new Kryss();
break;
case 1:
melee = new Broadsword();
break;
case 2:
melee = new Katana();
break;
}
melee.Movable = false;
AddItem(melee);
DragonHelm helm = new DragonHelm();
helm.Resource = res;
helm.Movable = false;
AddItem(helm);
DragonChest chest = new DragonChest();
chest.Resource = res;
chest.Movable = false;
AddItem(chest);
DragonArms arms = new DragonArms();
arms.Resource = res;
arms.Movable = false;
AddItem(arms);
DragonGloves gloves = new DragonGloves();
gloves.Resource = res;
gloves.Movable = false;
AddItem(gloves);
DragonLegs legs = new DragonLegs();
legs.Resource = res;
legs.Movable = false;
AddItem(legs);
ChaosShield shield = new ChaosShield();
shield.Movable = false;
AddItem(shield);
AddItem(new Shirt());
AddItem(new Boots());
int amount = Utility.RandomMinMax(1, 3);
switch ( res )
{
case CraftResource.BlackScales:
AddItem(new BlackScales(amount));
break;
case CraftResource.RedScales:
AddItem(new RedScales(amount));
break;
case CraftResource.BlueScales:
AddItem(new BlueScales(amount));
break;
case CraftResource.YellowScales:
AddItem(new YellowScales(amount));
break;
case CraftResource.GreenScales:
AddItem(new GreenScales(amount));
break;
case CraftResource.WhiteScales:
AddItem(new WhiteScales(amount));
break;
}
new SwampDragon().Rider = this;
SetSpecialAbility(SpecialAbility.DragonBreath);
}
public ChaosDragoon(Serial serial)
: base(serial)
{
}
public override bool AutoDispel
{
get
{
return true;
}
}
public override bool BardImmune
{
get
{
return !Core.AOS;
}
}
public override bool CanRummageCorpses
{
get
{
return true;
}
}
public override bool AlwaysMurderer
{
get
{
return true;
}
}
public override bool ShowFameTitle
{
get
{
return false;
}
}
public override int GetIdleSound()
{
return 0x2CE;
}
public override int GetDeathSound()
{
return 0x2CC;
}
public override int GetHurtSound()
{
return 0x2D1;
}
public override int GetAttackSound()
{
return 0x2C8;
}
public override void GenerateLoot()
{
AddLoot(LootPack.Rich);
}
public override bool OnBeforeDeath()
{
IMount mount = Mount;
if (mount != null)
mount.Rider = null;
return base.OnBeforeDeath();
}
public override void AlterMeleeDamageTo(Mobile to, ref int damage)
{
if (to is Dragon || to is WhiteWyrm || to is SwampDragon || to is Drake || to is Nightmare || to is Hiryu || to is LesserHiryu || to is Daemon)
damage *= 3;
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}

View File

@@ -0,0 +1,281 @@
using System;
using Server.Items;
namespace Server.Mobiles
{
[CorpseName("a chaos dragoon elite corpse")]
public class ChaosDragoonElite : BaseCreature
{
[Constructable]
public ChaosDragoonElite()
: base(AIType.AI_Mage, FightMode.Closest, 10, 1, 0.15, 0.4)
{
Name = "a chaos dragoon elite";
Body = 0x190;
Hue = Utility.RandomSkinHue();
SetStr(276, 350);
SetDex(66, 90);
SetInt(126, 150);
SetHits(276, 350);
SetDamage(29, 34);
SetDamageType(ResistanceType.Physical, 100);
/*SetResistance(ResistanceType.Physical, 45, 55);
SetResistance(ResistanceType.Fire, 15, 25);
SetResistance(ResistanceType.Cold, 50);
SetResistance(ResistanceType.Poison, 25, 35);
SetResistance(ResistanceType.Energy, 25, 35);*/
SetSkill(SkillName.Tactics, 80.1, 100.0);
SetSkill(SkillName.MagicResist, 100.1, 110.0);
SetSkill(SkillName.Anatomy, 80.1, 100.0);
SetSkill(SkillName.Magery, 85.1, 100.0);
SetSkill(SkillName.EvalInt, 85.1, 100.0);
SetSkill(SkillName.Swords, 72.5, 95.0);
SetSkill(SkillName.Fencing, 85.1, 100);
SetSkill(SkillName.Macing, 85.1, 100);
Fame = 8000;
Karma = -8000;
CraftResource res = CraftResource.None;
switch (Utility.Random(6))
{
case 0:
res = CraftResource.BlackScales;
break;
case 1:
res = CraftResource.RedScales;
break;
case 2:
res = CraftResource.BlueScales;
break;
case 3:
res = CraftResource.YellowScales;
break;
case 4:
res = CraftResource.GreenScales;
break;
case 5:
res = CraftResource.WhiteScales;
break;
}
BaseWeapon melee = null;
switch (Utility.Random(3))
{
case 0:
melee = new Kryss();
break;
case 1:
melee = new Broadsword();
break;
case 2:
melee = new Katana();
break;
}
melee.Movable = false;
AddItem(melee);
DragonChest Tunic = new DragonChest();
Tunic.Resource = res;
Tunic.Movable = false;
AddItem(Tunic);
DragonLegs Legs = new DragonLegs();
Legs.Resource = res;
Legs.Movable = false;
AddItem(Legs);
DragonArms Arms = new DragonArms();
Arms.Resource = res;
Arms.Movable = false;
AddItem(Arms);
DragonGloves Gloves = new DragonGloves();
Gloves.Resource = res;
Gloves.Movable = false;
AddItem(Gloves);
DragonHelm Helm = new DragonHelm();
Helm.Resource = res;
Helm.Movable = false;
AddItem(Helm);
ChaosShield shield = new ChaosShield();
shield.Movable = false;
AddItem(shield);
AddItem(new Boots(0x455));
AddItem(new Shirt(Utility.RandomMetalHue()));
int amount = Utility.RandomMinMax(1, 3);
switch (res)
{
case CraftResource.BlackScales:
AddItem(new BlackScales(amount));
break;
case CraftResource.RedScales:
AddItem(new RedScales(amount));
break;
case CraftResource.BlueScales:
AddItem(new BlueScales(amount));
break;
case CraftResource.YellowScales:
AddItem(new YellowScales(amount));
break;
case CraftResource.GreenScales:
AddItem(new GreenScales(amount));
break;
case CraftResource.WhiteScales:
AddItem(new WhiteScales(amount));
break;
}
switch (Utility.Random(9))
{
case 0:
res = CraftResource.DullCopper;
break;
case 1:
res = CraftResource.ShadowIron;
break;
case 2:
res = CraftResource.Copper;
break;
case 3:
res = CraftResource.Bronze;
break;
case 4:
res = CraftResource.Gold;
break;
case 5:
res = CraftResource.Agapite;
break;
case 6:
res = CraftResource.Verite;
break;
case 7:
res = CraftResource.Valorite;
break;
case 8:
res = CraftResource.Iron;
break;
}
SwampDragon mt = new SwampDragon();
mt.HasBarding = true;
mt.BardingResource = res;
mt.BardingHP = mt.BardingMaxHP;
mt.Rider = this;
SetSpecialAbility(SpecialAbility.DragonBreath);
}
public ChaosDragoonElite(Serial serial)
: base(serial)
{
}
public override bool AutoDispel
{
get
{
return true;
}
}
public override bool BardImmune
{
get
{
return !Core.AOS;
}
}
public override bool CanRummageCorpses
{
get
{
return true;
}
}
public override bool AlwaysMurderer
{
get
{
return true;
}
}
public override bool ShowFameTitle
{
get
{
return false;
}
}
public override int GetIdleSound()
{
return 0x2CE;
}
public override int GetDeathSound()
{
return 0x2CC;
}
public override int GetHurtSound()
{
return 0x2D1;
}
public override int GetAttackSound()
{
return 0x2C8;
}
public override void GenerateLoot()
{
AddLoot(LootPack.Rich);
AddLoot(LootPack.Gems);
}
public override bool OnBeforeDeath()
{
IMount mount = Mount;
if (mount != null)
{
if (mount is SwampDragon)
((SwampDragon)mount).HasBarding = false;
mount.Rider = null;
}
return base.OnBeforeDeath();
}
public override void AlterMeleeDamageTo(Mobile to, ref int damage)
{
if (to is Dragon || to is WhiteWyrm || to is SwampDragon || to is Drake || to is Nightmare || to is Hiryu || to is LesserHiryu || to is Daemon)
damage *= 3;
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}

View File

@@ -0,0 +1,97 @@
using System;
namespace Server.Mobiles
{
[CorpseName("a chicken corpse")]
public class Chicken : BaseCreature
{
[Constructable]
public Chicken()
: base(AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
{
Name = "a chicken";
Body = 0xD0;
BaseSoundID = 0x6E;
SetStr(5);
SetDex(15);
SetInt(5);
SetHits(3);
SetMana(0);
SetDamage(1);
SetDamageType(ResistanceType.Physical, 100);
SetResistance(ResistanceType.Physical, 1, 5);
SetSkill(SkillName.MagicResist, 4.0);
SetSkill(SkillName.Tactics, 5.0);
SetSkill(SkillName.Wrestling, 5.0);
Fame = 150;
Karma = 0;
VirtualArmor = 2;
Tamable = true;
ControlSlots = 1;
MinTameSkill = -0.9;
}
public Chicken(Serial serial)
: base(serial)
{
}
public override int Meat
{
get
{
return 1;
}
}
public override MeatType MeatType
{
get
{
return MeatType.Bird;
}
}
public override FoodType FavoriteFood
{
get
{
return FoodType.GrainsAndHay;
}
}
public override bool CanFly
{
get
{
return true;
}
}
public override int Feathers
{
get
{
return 25;
}
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}

View File

@@ -0,0 +1,112 @@
using System;
using Server.Items;
namespace Server.Mobiles
{
[CorpseName("a chicken lizard corpse")]
public class ChickenLizard : BaseCreature
{
private DateTime m_NextEgg;
[CommandProperty(AccessLevel.GameMaster)]
public DateTime NextEgg { get { return m_NextEgg; } }
[Constructable]
public ChickenLizard()
: base(AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
{
Name = "a chicken lizard";
Body = 716;
SetStr(74, 95);
SetDex(78, 95);
SetInt(6, 10);
SetHits(74, 95);
SetMana(6, 10);
SetStam(78, 95);
SetDamage(2, 5);
SetDamageType(ResistanceType.Physical, 100);
SetResistance(ResistanceType.Physical, 15, 20);
SetResistance(ResistanceType.Fire, 5, 15);
SetSkill(SkillName.MagicResist, 25.1, 29.6);
SetSkill(SkillName.Tactics, 30.1, 44.9);
SetSkill(SkillName.Wrestling, 26.2, 38.2);
Tamable = true;
ControlSlots = 1;
MinTameSkill = 0.0;
if (0.05 > Utility.RandomDouble())
PackItem(new ChickenLizardEgg());
}
public override int Meat { get { return 3; } }
public override MeatType MeatType { get { return MeatType.Bird; } }
public override FoodType FavoriteFood { get { return FoodType.Meat; } }
public override int GetIdleSound() { return 1511; }
public override int GetAngerSound() { return 1508; }
public override int GetHurtSound() { return 1510; }
public override int GetDeathSound() { return 1509; }
public override bool CheckFeed(Mobile from, Item dropped)
{
if (from.Map == null || from.Map == Map.Internal)
return false;
bool isBonded = IsBonded;
bool fed = base.CheckFeed(from, dropped);
if (!isBonded && IsBonded)
{
m_NextEgg = DateTime.UtcNow + TimeSpan.FromDays(1);
}
if (IsBonded && fed && DateTime.UtcNow >= m_NextEgg)
{
if (Utility.RandomBool())
{
ChickenLizardEgg egg = new ChickenLizardEgg();
if (from.Backpack == null || from.Backpack.TryDropItem(from, egg, false))
egg.MoveToWorld(from.Location, from.Map);
}
m_NextEgg = DateTime.UtcNow + TimeSpan.FromDays(7);
}
return fed;
}
public ChickenLizard(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)1);
writer.Write(m_NextEgg);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
switch(version)
{
case 1:
m_NextEgg = reader.ReadDateTime();
break;
}
}
}
}

View File

@@ -0,0 +1,98 @@
using System;
using Server.Items;
namespace Server.Mobiles
{
[CorpseName("a clan chitter assistant corpse")]
public class ClanCA : BaseCreature
{
//public override InhumanSpeech SpeechType{ get{ return InhumanSpeech.Ratman; } }
[Constructable]
public ClanCA()
: base(AIType.AI_Archer, FightMode.Closest, 10, 1, 0.2, 0.4)
{
this.Name = "Clan Chitter Assistant";
this.Body = 0x8E;
this.BaseSoundID = 437;
this.SetStr(146, 175);
this.SetDex(101, 130);
this.SetInt(120, 135);
this.SetHits(120, 145);
this.SetDamage(4, 10);
this.SetDamageType(ResistanceType.Physical, 100);
this.SetResistance(ResistanceType.Physical, 23, 35);
this.SetResistance(ResistanceType.Fire, 20, 30);
this.SetResistance(ResistanceType.Cold, 30, 50);
this.SetResistance(ResistanceType.Poison, 15, 20);
this.SetResistance(ResistanceType.Energy, 10, 20);
this.SetSkill(SkillName.Anatomy, 0);
this.SetSkill(SkillName.Archery, 80.1, 90.0);
this.SetSkill(SkillName.MagicResist, 81.1, 90.0);
this.SetSkill(SkillName.Tactics, 53.8, 75.0);
this.SetSkill(SkillName.Wrestling, 62.3, 75.0);
this.Fame = 6500;
this.Karma = -6500;
this.VirtualArmor = 56;
this.AddItem(new Bow());
this.PackItem(new Arrow(Utility.RandomMinMax(50, 70)));
}
public ClanCA(Serial serial)
: base(serial)
{
}
public override bool CanRummageCorpses
{
get
{
return true;
}
}
public override int Hides
{
get
{
return 8;
}
}
public override HideType HideType
{
get
{
return HideType.Spined;
}
}
public override void GenerateLoot()
{
this.AddLoot(LootPack.Rich);
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
if (this.Body == 42)
{
this.Body = 0x8E;
this.Hue = 0;
}
}
}
}

View File

@@ -0,0 +1,97 @@
using System;
using Server.Items;
namespace Server.Mobiles
{
[CorpseName("a clan scratch tinkerer corpse")]
public class ClanCT : BaseCreature
{
[Constructable]
public ClanCT()
: base(AIType.AI_Archer, FightMode.Closest, 10, 1, 0.2, 0.4)
{
this.Name = "Clan Scratch Tinkerer";
this.Body = 0x8E;
this.BaseSoundID = 437;
this.SetStr(300, 330);
this.SetDex(220, 240);
this.SetInt(240, 275);
this.SetHits(2025, 2068);
this.SetDamage(4, 10);
this.SetDamageType(ResistanceType.Physical, 100);
this.SetResistance(ResistanceType.Physical, 20, 30);
this.SetResistance(ResistanceType.Fire, 20, 30);
this.SetResistance(ResistanceType.Cold, 35, 50);
this.SetResistance(ResistanceType.Poison, 10, 20);
this.SetResistance(ResistanceType.Energy, 10, 20);
this.SetSkill(SkillName.Anatomy, 62.5, 82.6);
this.SetSkill(SkillName.Archery, 80.1, 90.0);
this.SetSkill(SkillName.MagicResist, 76.8, 99.3);
this.SetSkill(SkillName.Tactics, 64.2, 84.4);
this.SetSkill(SkillName.Wrestling, 62.8, 85.0);
this.Fame = 6500;
this.Karma = -6500;
this.VirtualArmor = 56;
this.AddItem(new Bow());
this.PackItem(new Arrow(Utility.RandomMinMax(50, 70)));
}
public ClanCT(Serial serial)
: base(serial)
{
}
public override bool CanRummageCorpses
{
get
{
return true;
}
}
public override int Hides
{
get
{
return 8;
}
}
public override HideType HideType
{
get
{
return HideType.Spined;
}
}
public override void GenerateLoot()
{
this.AddLoot(LootPack.Rich, 2);
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
if (this.Body == 42)
{
this.Body = 0x8E;
this.Hue = 0;
}
}
}
}

View File

@@ -0,0 +1,89 @@
using System;
using Server.Items;
namespace Server.Mobiles
{
[CorpseName("a clan ribbon courtier corpse")]
public class ClanRC : BaseCreature
{
//public override InhumanSpeech SpeechType{ get{ return InhumanSpeech.Ratman; } }
[Constructable]
public ClanRC()
: base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
{
Name = "Clan Ribbon Courtier";
Body = 42;
Hue = 2207;
BaseSoundID = 437;
SetStr(231);
SetDex(252);
SetInt(125);
SetHits(2054, 2100);
SetDamage(7, 14);
SetDamageType(ResistanceType.Physical, 100);
SetResistance(ResistanceType.Physical, 40);
SetResistance(ResistanceType.Fire, 10, 12);
SetResistance(ResistanceType.Cold, 15, 20);
SetResistance(ResistanceType.Poison, 10, 12);
SetResistance(ResistanceType.Energy, 10, 12);
SetSkill(SkillName.MagicResist, 113.5, 115.0);
SetSkill(SkillName.Tactics, 65.1, 70.0);
SetSkill(SkillName.Wrestling, 50.5, 55.0);
Fame = 1500;
Karma = -1500;
VirtualArmor = 48;
}
public ClanRC(Serial serial)
: base(serial)
{
}
public override bool CanRummageCorpses
{
get
{
return true;
}
}
public override int Hides
{
get
{
return 8;
}
}
public override HideType HideType
{
get
{
return HideType.Spined;
}
}
public override void GenerateLoot()
{
AddLoot(LootPack.Rich);
AddLoot(LootPack.Average);
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}

View File

@@ -0,0 +1,88 @@
using System;
using Server.Items;
namespace Server.Mobiles
{
[CorpseName("a clan ribbon supplicant corpse")]
public class ClanRS : BaseCreature
{
//public override InhumanSpeech SpeechType{ get{ return InhumanSpeech.Ratman; } }
[Constructable]
public ClanRS()
: base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
{
this.Name = "Clan Ribbon Supplicant";
this.Body = 42;
this.Hue = 2952;
this.BaseSoundID = 437;
this.SetStr(173);
this.SetDex(117);
this.SetInt(207);
this.SetHits(127);
this.SetDamage(7, 14);
this.SetDamageType(ResistanceType.Physical, 100);
this.SetResistance(ResistanceType.Physical, 55, 60);
this.SetResistance(ResistanceType.Fire, 30, 35);
this.SetResistance(ResistanceType.Cold, 80, 85);
this.SetResistance(ResistanceType.Poison, 45, 50);
this.SetResistance(ResistanceType.Energy, 25, 30);
this.SetSkill(SkillName.MagicResist, 78.5, 80.0);
this.SetSkill(SkillName.Tactics, 62.1, 65.0);
this.SetSkill(SkillName.Wrestling, 56.5, 60.0);
this.Fame = 1500;
this.Karma = -1500;
this.VirtualArmor = 48;
}
public ClanRS(Serial serial)
: base(serial)
{
}
public override bool CanRummageCorpses
{
get
{
return true;
}
}
public override int Hides
{
get
{
return 8;
}
}
public override HideType HideType
{
get
{
return HideType.Spined;
}
}
public override void GenerateLoot()
{
this.AddLoot(LootPack.Rich, 3);
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}

View File

@@ -0,0 +1,87 @@
using System;
namespace Server.Mobiles
{
[CorpseName("a rat corpse")]
public class ClanRibbonPlagueRat : BaseCreature
{
[Constructable]
public ClanRibbonPlagueRat()
: base(AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
{
this.Name = "Clan Ribbon Plague Rat";
this.Body = 238;
this.BaseSoundID = 0xCC;
this.SetStr(59);
this.SetDex(51);
this.SetInt(17);
this.SetHits(92);
this.SetStam(51);
this.SetDamage(4, 8);
this.SetDamageType(ResistanceType.Physical, 100);
this.SetResistance(ResistanceType.Physical, 30, 40);
this.SetResistance(ResistanceType.Poison, 5, 10);
this.SetResistance(ResistanceType.Fire, 20, 30);
this.SetResistance(ResistanceType.Cold, 30, 40);
this.SetResistance(ResistanceType.Energy, 30, 40);
this.SetSkill(SkillName.MagicResist, 30.0);
this.SetSkill(SkillName.Tactics, 34.0);
this.SetSkill(SkillName.Wrestling, 40.0);
this.Fame = 150;
this.Karma = -150;
this.VirtualArmor = 6;
this.Hue = 52;
this.Tamable = false;
this.ControlSlots = 1;
this.MinTameSkill = -0.9;
}
public ClanRibbonPlagueRat(Serial serial)
: base(serial)
{
}
public override int Meat
{
get
{
return 1;
}
}
public override FoodType FavoriteFood
{
get
{
return FoodType.Meat | FoodType.Fish | FoodType.Eggs | FoodType.GrainsAndHay;
}
}
public override void GenerateLoot()
{
this.AddLoot(LootPack.Poor);
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}

View File

@@ -0,0 +1,87 @@
using System;
using Server.Items;
namespace Server.Mobiles
{
[CorpseName("a clan scratch henchrat corpse")]
public class ClanSH : BaseCreature
{
[Constructable]
public ClanSH()
: base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
{
this.Name = "Clan Scratch Henchrat";
this.Body = 42;
this.BaseSoundID = 437;
this.SetStr(227);
this.SetDex(183);
this.SetInt(93);
this.SetHits(2065);
this.SetDamage(5, 7);
this.SetDamageType(ResistanceType.Physical, 100);
this.SetResistance(ResistanceType.Physical, 26, 30);
this.SetResistance(ResistanceType.Fire, 29, 35);
this.SetResistance(ResistanceType.Cold, 30, 35);
this.SetResistance(ResistanceType.Poison, 15, 20);
this.SetResistance(ResistanceType.Energy, 13, 15);
this.SetSkill(SkillName.MagicResist, 35.4, 40.0);
this.SetSkill(SkillName.Tactics, 61.1, 65.0);
this.SetSkill(SkillName.Wrestling, 64.0, 65.0);
this.SetSkill(SkillName.Anatomy, 74.0, 75.0);
this.Fame = 1500;
this.Karma = -1500;
this.VirtualArmor = 48;
}
public ClanSH(Serial serial)
: base(serial)
{
}
public override bool CanRummageCorpses
{
get
{
return true;
}
}
public override int Hides
{
get
{
return 8;
}
}
public override HideType HideType
{
get
{
return HideType.Spined;
}
}
public override void GenerateLoot()
{
this.AddLoot(LootPack.Rich, 3);
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}

View File

@@ -0,0 +1,97 @@
using System;
using Server.Items;
namespace Server.Mobiles
{
[CorpseName("a clan scratch scrounger corpse")]
public class ClanSS : BaseCreature
{
[Constructable]
public ClanSS()
: base(AIType.AI_Archer, FightMode.Closest, 10, 1, 0.2, 0.4)
{
Name = "Clan Scratch Scrounger";
Body = 0x8E;
BaseSoundID = 437;
SetStr(97, 100);
SetDex(98, 100);
SetInt(45, 50);
SetHits(135);
SetDamage(4, 5);
SetDamageType(ResistanceType.Physical, 100);
SetResistance(ResistanceType.Physical, 25, 30);
SetResistance(ResistanceType.Fire, 20, 25);
SetResistance(ResistanceType.Cold, 49, 55);
SetResistance(ResistanceType.Poison, 10, 20);
SetResistance(ResistanceType.Energy, 10, 20);
SetSkill(SkillName.Anatomy, 51.5, 55.5);
SetSkill(SkillName.MagicResist, 65.1, 90.0);
SetSkill(SkillName.Tactics, 59.1, 65.0);
SetSkill(SkillName.Wrestling, 72.5, 75.0);
Fame = 6500;
Karma = -6500;
VirtualArmor = 56;
AddItem(new Bow());
PackItem(new Arrow(Utility.RandomMinMax(50, 70)));
}
public ClanSS(Serial serial)
: base(serial)
{
}
public override bool CanRummageCorpses
{
get
{
return true;
}
}
public override int Hides
{
get
{
return 8;
}
}
public override HideType HideType
{
get
{
return HideType.Spined;
}
}
public override int TreasureMapLevel
{
get
{
return 2;
}
}
public override void GenerateLoot()
{
AddLoot(LootPack.Rich, 2);
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}

View File

@@ -0,0 +1,92 @@
using System;
using Server.Items;
namespace Server.Mobiles
{
[CorpseName("a clan scratch savage wolf corpse")]
public class ClanSSW : BaseCreature
{
[Constructable]
public ClanSSW()
: base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
{
Name = "Clan Scratch Savage Wolf";
Body = 98;
Hue = 0x2C;
BaseSoundID = 229;
SetStr(170);
SetDex(244);
SetInt(57);
SetHits(65);
SetDamage(8, 10);
SetDamageType(ResistanceType.Physical, 20);
SetDamageType(ResistanceType.Cold, 80);
SetResistance(ResistanceType.Physical, 30, 35);
SetResistance(ResistanceType.Cold, 40, 45);
SetResistance(ResistanceType.Poison, 25, 30);
SetResistance(ResistanceType.Energy, 20, 25);
SetSkill(SkillName.Swords, 99.0, 100.0);
SetSkill(SkillName.MagicResist, 41.5, 42.5);
SetSkill(SkillName.Tactics, 65.1, 70.0);
SetSkill(SkillName.Wrestling, 42.3, 45.5);
Fame = 3400;
Karma = -3400;
VirtualArmor = 50;
SetWeaponAbility(WeaponAbility.ParalyzingBlow);
}
public ClanSSW(Serial serial)
: base(serial)
{
}
public override int Meat
{
get
{
return 1;
}
}
public override FoodType FavoriteFood
{
get
{
return FoodType.Meat;
}
}
public override PackInstinct PackInstinct
{
get
{
return PackInstinct.Canine;
}
}
public override void GenerateLoot()
{
AddLoot(LootPack.Average);
AddLoot(LootPack.Meager);
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}

View File

@@ -0,0 +1,190 @@
using System;
namespace Server.Mobiles
{
[CorpseName("a clockwork scorpion corpse")]
public class ClockworkScorpion : BaseCreature, IRepairableMobile
{
public Type RepairResource { get { return typeof(Server.Items.IronIngot); } }
[Constructable]
public ClockworkScorpion()
: base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.4, 0.8)
{
Name = "a clockwork scorpion";
Body = 717;
SetStr(225, 245);
SetDex(80, 100);
SetInt(30, 40);
SetHits(151, 210);
SetDamage(5, 10);
SetDamageType(ResistanceType.Physical, 60);
SetDamageType(ResistanceType.Poison, 40);
SetResistance(ResistanceType.Physical, 80, 100);
SetResistance(ResistanceType.Fire, 20, 30);
SetResistance(ResistanceType.Cold, 60, 80);
SetResistance(ResistanceType.Poison, 100);
SetResistance(ResistanceType.Energy, 10, 25);
SetSkill(SkillName.MagicResist, 30.1, 50.0);
SetSkill(SkillName.Poisoning, 95.1, 100.0);
SetSkill(SkillName.Tactics, 70.1, 90.0);
SetSkill(SkillName.Wrestling, 50.1, 80.0);
Fame = 3500;
Karma = -3500;
ControlSlots = 1;
}
public ClockworkScorpion(Serial serial)
: base(serial)
{
}
public override bool IsScaredOfScaryThings
{
get
{
return false;
}
}
public override bool IsScaryToPets
{
get
{
return true;
}
}
public override bool IsBondable
{
get
{
return false;
}
}
public override FoodType FavoriteFood
{
get
{
return FoodType.Meat;
}
}
public override bool AutoDispel
{
get
{
return !Controlled;
}
}
public override bool BleedImmune
{
get
{
return true;
}
}
public override bool DeleteOnRelease
{
get
{
return true;
}
}
public override bool BardImmune
{
get
{
return !Core.AOS || Controlled;
}
}
public override Poison PoisonImmune
{
get
{
return Poison.Lethal;
}
}
public override void GenerateLoot()
{
AddLoot(LootPack.Meager, 2);
}
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 OnDamage(int amount, Mobile from, bool willKill)
{
Mobile master = GetMaster();
if (master != null && master.Player && 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((int)1);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
if (version == 0 && (AbilityProfile == null || AbilityProfile.MagicalAbility == MagicalAbility.None))
{
SetMagicalAbility(MagicalAbility.Poisoning);
}
}
}
}

View File

@@ -0,0 +1,109 @@
using System;
using Server.Gumps;
namespace Server.Mobiles
{
public class CoconutCrabStatue : Item, ICreatureStatuette
{
public override int LabelNumber { get { return 1159165; } } // Coconut Crab
public Type CreatureType { get { return typeof(CoconutCrab); } }
[Constructable]
public CoconutCrabStatue()
: base(0xA335)
{
LootType = LootType.Blessed;
}
public CoconutCrabStatue(Serial serial)
: base(serial)
{
}
public override void OnDoubleClick(Mobile from)
{
if (IsChildOf(from.Backpack))
from.SendGump(new ConfirmMountStatuetteGump(this));
else
from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it.
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
[CorpseName("a Coconut Crab corpse")]
public class CoconutCrab : BaseMount
{
[Constructable]
public CoconutCrab()
: this("Coconut Crab")
{
}
[Constructable]
public CoconutCrab(string name)
: base(name, 1510, 16081, AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
{
BaseSoundID = 0x4F2;
SetStr(400);
SetDex(125);
SetInt(50, 55);
SetHits(240);
SetMana(0);
SetDamage(1, 4);
SetDamageType(ResistanceType.Physical, 100);
SetResistance(ResistanceType.Physical, 40, 50);
SetResistance(ResistanceType.Fire, 30, 40);
SetResistance(ResistanceType.Cold, 30, 40);
SetResistance(ResistanceType.Poison, 30, 40);
SetResistance(ResistanceType.Energy, 30, 40);
SetSkill(SkillName.MagicResist, 25.0, 30.0);
SetSkill(SkillName.Tactics, 30.0, 40.0);
SetSkill(SkillName.Wrestling, 30.0, 35.0);
Fame = 300;
Karma = 300;
Tamable = true;
ControlSlots = 1;
MinTameSkill = 30.0;
}
public CoconutCrab(Serial serial)
: base(serial)
{
}
public override int Meat { get { return 3; } }
public override int Hides { get { return 10; } }
public override FoodType FavoriteFood { get { return FoodType.FruitsAndVegies; } }
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}

View File

@@ -0,0 +1,107 @@
using System;
using Server;
using Server.Items;
namespace Server.Mobiles
{
[CorpseName("a drake corpse")]
public class ColdDrake : BaseCreature, IAuraCreature
{
[Constructable]
public ColdDrake() : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
{
Name = "a cold drake";
Body = Utility.RandomList(60, 61);
BaseSoundID = 362;
Hue = Utility.RandomMinMax(1319, 1327);
SetStr(610, 670);
SetDex(130, 160);
SetInt(150, 190);
SetHits(450, 500);
SetDamage(17, 20);
SetDamageType(ResistanceType.Physical, 50);
SetDamageType(ResistanceType.Cold, 50);
SetResistance(ResistanceType.Physical, 50, 65);
SetResistance(ResistanceType.Fire, 30, 40);
SetResistance(ResistanceType.Cold, 75, 90);
SetResistance(ResistanceType.Poison, 40, 50);
SetResistance(ResistanceType.Energy, 40, 50);
SetSkill(SkillName.MagicResist, 95.0, 110.0);
SetSkill(SkillName.Tactics, 115.0, 140.0);
SetSkill(SkillName.Wrestling, 115.0, 126.0);
SetSkill(SkillName.Parry, 70.0, 80.0);
SetSkill(SkillName.DetectHidden, 40.0, 50.0);
Fame = 12000;
Karma = -12000;
VirtualArmor = 60;
Tamable = true;
ControlSlots = 3;
MinTameSkill = 96.0;
PackReg(3);
for (int i = 0; i <= 1; i++)
{
Item item;
if (Utility.RandomBool())
item = Loot.RandomScroll(0, Loot.NecromancyScrollTypes.Length, SpellbookType.Necromancer);
else
item = Loot.RandomScroll(0, Loot.RegularScrollTypes.Length, SpellbookType.Regular);
PackItem(item);
}
SetSpecialAbility(SpecialAbility.DragonBreath);
SetAreaEffect(AreaEffect.AuraDamage);
}
public override void GenerateLoot()
{
AddLoot(LootPack.FilthyRich, 3);
}
public override bool CanAngerOnTame { get { return true; } }
public override bool ReacquireOnMovement { get { return !Controlled; } }
public override int TreasureMapLevel { get { return 3; } }
public override int Meat { get { return 10; } }
public override int Hides { get { return 22; } }
public override HideType HideType { get { return HideType.Horned; } }
public override int DragonBlood { get { return 8; } }
public override FoodType FavoriteFood { get { return FoodType.Fish; } }
public virtual void AuraEffect(Mobile m)
{
m.FixedParticles(0x374A, 10, 30, 5052, Hue, 0, EffectLayer.Waist);
m.PlaySound(0x5C6);
m.SendLocalizedMessage(1008111, false, Name); // : The intense cold is damaging you!
}
public ColdDrake(Serial serial) : base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}

View File

@@ -0,0 +1,107 @@
using System;
using Server.Items;
namespace Server.Mobiles
{
[CorpseName("an ore elemental corpse")]
public class CopperElemental : BaseCreature
{
[Constructable]
public CopperElemental()
: this(25)
{
}
[Constructable]
public CopperElemental(int oreAmount)
: base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
{
Name = "a copper elemental";
Body = 109;
BaseSoundID = 268;
SetStr(226, 255);
SetDex(126, 145);
SetInt(71, 92);
SetHits(136, 153);
SetDamage(9, 16);
SetDamageType(ResistanceType.Physical, 100);
SetResistance(ResistanceType.Physical, 30, 40);
SetResistance(ResistanceType.Fire, 30, 40);
SetResistance(ResistanceType.Cold, 30, 40);
SetResistance(ResistanceType.Poison, 20, 30);
SetResistance(ResistanceType.Energy, 10, 20);
SetSkill(SkillName.MagicResist, 50.1, 95.0);
SetSkill(SkillName.Tactics, 60.1, 100.0);
SetSkill(SkillName.Wrestling, 60.1, 100.0);
Fame = 4800;
Karma = -4800;
VirtualArmor = 26;
Item ore = new CopperOre(oreAmount);
ore.ItemID = 0x19B9;
PackItem(ore);
}
public CopperElemental(Serial serial)
: base(serial)
{
}
public override bool BleedImmune
{
get
{
return true;
}
}
public override bool AutoDispel
{
get
{
return true;
}
}
public override int TreasureMapLevel
{
get
{
return 1;
}
}
public override void GenerateLoot()
{
AddLoot(LootPack.Average);
AddLoot(LootPack.Gems, 2);
}
public override void CheckReflect(Mobile caster, ref bool reflect)
{
reflect = true; // Every spell is reflected back to the caster
}
public override void AlterMeleeDamageFrom(Mobile from, ref int damage)
{
AOS.Damage(from, this, damage / 2, 0, 0, 0, 0, 0, 0, 100);
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}

View File

@@ -0,0 +1,93 @@
using Server.Items;
namespace Server.Mobiles
{
[CorpseName("a snake corpse")]
public class CoralSnake : BaseCreature
{
[Constructable]
public CoralSnake()
: base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
{
Name = "a coral snake";
Body = 52;
Hue = 0x21;
BaseSoundID = 0xDB;
SetStr(205, 340);
SetDex(248, 300);
SetInt(28, 35);
SetHits(132, 200);
SetMana(28, 35);
SetDamage(5, 21);
SetDamageType(ResistanceType.Physical, 50);
SetDamageType(ResistanceType.Poison, 50);
SetResistance(ResistanceType.Physical, 42, 50);
SetResistance(ResistanceType.Fire, 5, 20);
SetResistance(ResistanceType.Physical, 5, 20);
SetResistance(ResistanceType.Poison, 100);
SetResistance(ResistanceType.Energy, 5, 20);
SetSkill(SkillName.Poisoning, 99.7, 110.9);
SetSkill(SkillName.MagicResist, 98.1, 105.0);
SetSkill(SkillName.Tactics, 82.0, 98.0);
SetSkill(SkillName.Wrestling, 90.3, 105.0);
Fame = 300;
Karma = -300;
VirtualArmor = 16;
Tamable = false;
ControlSlots = 1;
MinTameSkill = 59.1;
}
public CoralSnake(Serial serial)
: base(serial)
{
}
public override Poison PoisonImmune
{
get { return Poison.Lesser; }
}
public override Poison HitPoison
{
get { return Poison.Deadly; }
}
//public override bool DeathAdderCharmable{ get{ return true; } }
public override int Meat
{
get { return 1; }
}
public override FoodType FavoriteFood
{
get { return FoodType.Eggs; }
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)1);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
if (version == 0 && (AbilityProfile == null || AbilityProfile.MagicalAbility == MagicalAbility.None))
{
SetMagicalAbility(MagicalAbility.Poisoning);
}
}
}
}

View File

@@ -0,0 +1,77 @@
using System;
namespace Server.Mobiles
{
[CorpseName("a corporeal brume corpse")]
public class CorporealBrume : BaseCreature, IAuraCreature
{
[Constructable]
public CorporealBrume()
: base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
{
Name = "a corporeal brume";
Body = 0x104;
BaseSoundID = 0x56B;
SetStr(400, 450);
SetDex(100, 150);
SetInt(50, 60);
SetHits(1150, 1250);
SetDamage(21, 25);
SetDamageType(ResistanceType.Physical, 100);
SetResistance(ResistanceType.Physical, 100);
SetResistance(ResistanceType.Fire, 40, 50);
SetResistance(ResistanceType.Cold, 40, 50);
SetResistance(ResistanceType.Poison, 50, 60);
SetResistance(ResistanceType.Energy, 30, 40);
SetSkill(SkillName.Wrestling, 110.0, 115.0);
SetSkill(SkillName.Tactics, 110.0, 115.0);
SetSkill(SkillName.MagicResist, 80.0, 95.0);
SetSkill(SkillName.Anatomy, 100.0, 110.0);
Fame = 12000;
Karma = -12000;
SetAreaEffect(AreaEffect.AuraDamage);
}
public CorporealBrume(Serial serial)
: base(serial)
{
}
public override bool CanBeParagon { get { return false; } }
public void AuraEffect(Mobile m)
{
m.FixedParticles(0x374A, 10, 15, 5038, 1181, 2, EffectLayer.Head);
m.PlaySound(0x213);
m.SendLocalizedMessage(1008111, false, Name); // : The intense cold is damaging you!
}
public override void GenerateLoot()
{
AddLoot(LootPack.FilthyRich);
AddLoot(LootPack.Rich);
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}

View File

@@ -0,0 +1,87 @@
using System;
using Server.Items;
namespace Server.Mobiles
{
[CorpseName("a corpser corpse")]
public class Corpser : BaseCreature
{
[Constructable]
public Corpser()
: base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
{
this.Name = "a corpser";
this.Body = 8;
this.BaseSoundID = 684;
this.SetStr(156, 180);
this.SetDex(26, 45);
this.SetInt(26, 40);
this.SetHits(94, 108);
this.SetMana(0);
this.SetDamage(10, 23);
this.SetDamageType(ResistanceType.Physical, 60);
this.SetDamageType(ResistanceType.Poison, 40);
this.SetResistance(ResistanceType.Physical, 15, 20);
this.SetResistance(ResistanceType.Fire, 15, 25);
this.SetResistance(ResistanceType.Cold, 10, 20);
this.SetResistance(ResistanceType.Poison, 20, 30);
this.SetSkill(SkillName.MagicResist, 15.1, 20.0);
this.SetSkill(SkillName.Tactics, 45.1, 60.0);
this.SetSkill(SkillName.Wrestling, 45.1, 60.0);
this.Fame = 1000;
this.Karma = -1000;
this.VirtualArmor = 18;
if (0.25 > Utility.RandomDouble())
this.PackItem(new Board(10));
else
this.PackItem(new Log(10));
this.PackItem(new MandrakeRoot(3));
}
public Corpser(Serial serial)
: base(serial)
{
}
public override Poison PoisonImmune
{
get
{
return Poison.Lesser;
}
}
public override bool DisallowAllMoves
{
get
{
return true;
}
}
public override void GenerateLoot()
{
this.AddLoot(LootPack.Meager);
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}

View File

@@ -0,0 +1,116 @@
using System;
using Server.Items;
namespace Server.Mobiles
{
[CorpseName("a slimey corpse")]
public class CorrosiveSlime : BaseCreature
{
[Constructable]
public CorrosiveSlime()
: base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
{
Name = "a corrosive slime";
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, 15, 20);
SetSkill(SkillName.Poisoning, 36.0, 49.1);
SetSkill(SkillName.Anatomy, 0);
SetSkill(SkillName.MagicResist, 15.9, 18.9);
SetSkill(SkillName.Tactics, 24.6, 26.1);
SetSkill(SkillName.Wrestling, 24.9, 26.1);
Fame = 300;
Karma = -300;
VirtualArmor = 8;
Tamable = true;
ControlSlots = 1;
MinTameSkill = 23.1;
}
public CorrosiveSlime(Serial serial)
: base(serial)
{
}
public override Poison PoisonImmune
{
get
{
return Poison.Regular;
}
}
public override Poison HitPoison
{
get
{
return Poison.Regular;
}
}
public override FoodType FavoriteFood
{
get
{
return FoodType.Fish;
}
}
public override void GenerateLoot()
{
AddLoot(LootPack.Poor);
AddLoot(LootPack.Gems);
}
public override void OnDeath(Container c)
{
if (!Controlled && Map != null && Map != Map.TerMur && Utility.Random(10) == 0)
{
Item item = null;
switch (Utility.Random(3))
{
case 0: item = new GelatanousSkull(); break;
case 1: item = new CoagulatedLegs(); break;
case 2: item = new PartiallyDigestedTorso(); break;
}
if (item != null)
c.DropItem(item);
}
base.OnDeath(c);
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)1);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
if (version == 0 && (AbilityProfile == null || AbilityProfile.MagicalAbility == MagicalAbility.None))
{
SetMagicalAbility(MagicalAbility.Poisoning);
}
}
}
}

View File

@@ -0,0 +1,113 @@
using System;
namespace Server.Mobiles
{
public class CorruptedSoul : BaseCreature
{
[Constructable]
public CorruptedSoul()
: base(AIType.AI_Melee, FightMode.Closest, 10, 1, .1, 5)
{
this.Name = "a corrupted soul";
this.Body = 0x3CA;
this.Hue = 0x453;
this.SetStr(102, 115);
this.SetDex(101, 115);
this.SetInt(203, 215);
this.SetHits(61, 69);
this.SetDamage(4, 40);
this.SetDamageType(ResistanceType.Physical, 100);
this.SetResistance(ResistanceType.Physical, 61, 74);
this.SetResistance(ResistanceType.Fire, 22, 48);
this.SetResistance(ResistanceType.Cold, 73, 100);
this.SetResistance(ResistanceType.Poison, 0);
this.SetResistance(ResistanceType.Energy, 51, 60);
this.SetSkill(SkillName.MagicResist, 80.2, 89.4);
this.SetSkill(SkillName.Tactics, 81.3, 89.9);
this.SetSkill(SkillName.Wrestling, 80.1, 88.7);
this.Fame = 5000;
this.Karma = -5000;
// VirtualArmor = 6; Not sure
}
public CorruptedSoul(Serial serial)
: base(serial)
{
}
public override bool DeleteCorpseOnDeath
{
get
{
return true;
}
}
public override bool AlwaysAttackable
{
get
{
return true;
}
}
public override bool BleedImmune
{
get
{
return true;
}
}// NEED TO VERIFY
// NEED TO VERIFY SOUNDS! Known: No Idle Sound.
/*public override int GetDeathSound()
{
return 0x0;
}*/
public override bool AlwaysMurderer
{
get
{
return true;
}
}
/*public override int GetAngerSound()
{
return 0x0;
}*/
public override int GetAttackSound()
{
return 0x233;
}
// TODO: Proper OnDeath Effect
public override bool OnBeforeDeath()
{
if (!base.OnBeforeDeath())
return false;
// 1 in 20 chance that a Thread of Fate will appear in the killer's pack
Effects.SendLocationEffect(this.Location, this.Map, 0x376A, 10, 1);
return true;
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}

View File

@@ -0,0 +1,93 @@
using System;
namespace Server.Mobiles
{
[CorpseName("a cougar corpse")]
public class Cougar : BaseCreature
{
[Constructable]
public Cougar()
: base(AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
{
this.Name = "a cougar";
this.Body = 63;
this.BaseSoundID = 0x73;
this.SetStr(56, 80);
this.SetDex(66, 85);
this.SetInt(26, 50);
this.SetHits(34, 48);
this.SetMana(0);
this.SetDamage(4, 10);
this.SetDamageType(ResistanceType.Physical, 100);
this.SetResistance(ResistanceType.Physical, 20, 25);
this.SetResistance(ResistanceType.Fire, 5, 10);
this.SetResistance(ResistanceType.Cold, 10, 15);
this.SetResistance(ResistanceType.Poison, 5, 10);
this.SetSkill(SkillName.MagicResist, 15.1, 30.0);
this.SetSkill(SkillName.Tactics, 45.1, 60.0);
this.SetSkill(SkillName.Wrestling, 45.1, 60.0);
this.Fame = 450;
this.Karma = 0;
this.VirtualArmor = 16;
this.Tamable = true;
this.ControlSlots = 1;
this.MinTameSkill = 41.1;
}
public Cougar(Serial serial)
: base(serial)
{
}
public override int Meat
{
get
{
return 1;
}
}
public override int Hides
{
get
{
return 10;
}
}
public override FoodType FavoriteFood
{
get
{
return FoodType.Fish | FoodType.Meat;
}
}
public override PackInstinct PackInstinct
{
get
{
return PackInstinct.Feline;
}
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}

View File

@@ -0,0 +1,163 @@
using System;
namespace Server.Mobiles
{
[CorpseName("a cow corpse")]
public class Cow : BaseCreature
{
private DateTime m_MilkedOn;
private int m_Milk;
[Constructable]
public Cow()
: base(AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
{
Name = "a cow";
Body = Utility.RandomList(0xD8, 0xE7);
BaseSoundID = 0x78;
SetStr(30);
SetDex(15);
SetInt(5);
SetHits(18);
SetMana(0);
SetDamage(1, 4);
SetDamageType(ResistanceType.Physical, 100);
SetResistance(ResistanceType.Physical, 5, 15);
SetSkill(SkillName.MagicResist, 5.5);
SetSkill(SkillName.Tactics, 5.5);
SetSkill(SkillName.Wrestling, 5.5);
Fame = 300;
Karma = 0;
VirtualArmor = 10;
Tamable = true;
ControlSlots = 1;
MinTameSkill = 11.1;
if (Core.AOS && Utility.Random(1000) == 0) // 0.1% chance to have mad cows
FightMode = FightMode.Closest;
}
public Cow(Serial serial)
: base(serial)
{
}
[CommandProperty(AccessLevel.GameMaster)]
public DateTime MilkedOn
{
get
{
return m_MilkedOn;
}
set
{
m_MilkedOn = value;
}
}
[CommandProperty(AccessLevel.GameMaster)]
public int Milk
{
get
{
return m_Milk;
}
set
{
m_Milk = value;
}
}
public override int Meat
{
get
{
return 8;
}
}
public override int Hides
{
get
{
return 12;
}
}
public override FoodType FavoriteFood
{
get
{
return FoodType.FruitsAndVegies | FoodType.GrainsAndHay;
}
}
public override void OnDoubleClick(Mobile from)
{
base.OnDoubleClick(from);
int random = Utility.Random(100);
if (random < 5)
Tip();
else if (random < 20)
PlaySound(120);
else if (random < 40)
PlaySound(121);
}
public void Tip()
{
PlaySound(121);
Animate(8, 0, 3, true, false, 0);
}
public bool TryMilk(Mobile from)
{
if (!from.InLOS(this) || !from.InRange(Location, 2))
from.SendLocalizedMessage(1080400); // You can not milk the cow from this location.
if (Controlled && ControlMaster != from)
from.SendLocalizedMessage(1071182); // The cow nimbly escapes your attempts to milk it.
if (m_Milk == 0 && m_MilkedOn + TimeSpan.FromDays(1) > DateTime.UtcNow)
from.SendLocalizedMessage(1080198); // This cow can not be milked now. Please wait for some time.
else
{
if (m_Milk == 0)
m_Milk = 4;
m_MilkedOn = DateTime.UtcNow;
m_Milk--;
return true;
}
return false;
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)1);
writer.Write((DateTime)m_MilkedOn);
writer.Write((int)m_Milk);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
if (version > 0)
{
m_MilkedOn = reader.ReadDateTime();
m_Milk = reader.ReadInt();
}
}
}
}

View File

@@ -0,0 +1,97 @@
using System;
namespace Server.Mobiles
{
[CorpseName("a crane corpse")]
public class Crane : BaseCreature
{
[Constructable]
public Crane()
: base(AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
{
this.Name = "a crane";
this.Body = 254;
this.BaseSoundID = 0x4D7;
this.SetStr(26, 35);
this.SetDex(16, 25);
this.SetInt(11, 15);
this.SetHits(26, 35);
this.SetMana(0);
this.SetDamage(1, 1);
this.SetDamageType(ResistanceType.Physical, 100);
this.SetResistance(ResistanceType.Physical, 5, 5);
this.SetSkill(SkillName.MagicResist, 4.1, 5.0);
this.SetSkill(SkillName.Tactics, 10.1, 11.0);
this.SetSkill(SkillName.Wrestling, 10.1, 11.0);
this.Fame = 0;
this.Karma = 200;
this.VirtualArmor = 5;
}
public Crane(Serial serial)
: base(serial)
{
}
public override int Meat
{
get
{
return 1;
}
}
public override int Feathers
{
get
{
return 25;
}
}
public override int GetAngerSound()
{
return 0x4D9;
}
public override int GetIdleSound()
{
return 0x4D8;
}
public override int GetAttackSound()
{
return 0x4D7;
}
public override int GetHurtSound()
{
return 0x4DA;
}
public override int GetDeathSound()
{
return 0x4D6;
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}

View File

@@ -0,0 +1,152 @@
using System;
namespace Server.Mobiles
{
[CorpseName("a crimson drake corpse")]
public class CrimsonDrake : BaseCreature, IElementalCreature
{
private ElementType m_Type;
public ElementType ElementType { get { return m_Type; } }
[Constructable]
public CrimsonDrake()
: this((ElementType)Utility.Random(5))
{
}
[Constructable]
public CrimsonDrake(ElementType type)
: base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
{
m_Type = type;
switch (type)
{
case ElementType.Physical:
Body = 0x58B;
Hue = 0;
SetDamageType(ResistanceType.Physical, 100);
break;
case ElementType.Fire:
Body = 0x58C;
Hue = 33929;
SetDamageType(ResistanceType.Physical, 0);
SetDamageType(ResistanceType.Fire, 100);
break;
case ElementType.Cold:
Body = 0x58C;
Hue = 34134;
SetDamageType(ResistanceType.Physical, 0);
SetDamageType(ResistanceType.Cold, 100);
break;
case ElementType.Poison:
Body = 0x58C;
Hue = 34136;
SetDamageType(ResistanceType.Physical, 0);
SetDamageType(ResistanceType.Poison, 100);
break;
case ElementType.Energy:
Body = 0x58C;
Hue = 34141;
SetDamageType(ResistanceType.Physical, 0);
SetDamageType(ResistanceType.Energy, 100);
break;
}
Name = "Crimson Drake";
Female = true;
BaseSoundID = 362;
SetStr(400, 430);
SetDex(133, 152);
SetInt(101, 140);
SetHits(241, 258);
SetDamage(11, 17);
SetResistance(ResistanceType.Physical, 30, 50);
SetResistance(ResistanceType.Fire, 30, 40);
SetResistance(ResistanceType.Cold, 30, 40);
SetResistance(ResistanceType.Poison, 40, 50);
SetResistance(ResistanceType.Energy, 30, 50);
SetSkill(SkillName.MagicResist, 65.1, 80.0);
SetSkill(SkillName.Tactics, 65.1, 90.0);
SetSkill(SkillName.Wrestling, 65.1, 80.0);
SetSkill(SkillName.DetectHidden, 50.0, 60.0);
SetSkill(SkillName.Focus, 5.0, 10.0);
Fame = 5500;
Karma = -5500;
VirtualArmor = 46;
Tamable = true;
ControlSlots = 2;
MinTameSkill = 85.0;
PackReg(3);
SetSpecialAbility(SpecialAbility.DragonBreath);
}
public CrimsonDrake(Serial serial)
: base(serial)
{
}
public static TrainingDefinition _PoisonDrakeDefinition;
public override TrainingDefinition TrainingDefinition
{
get
{
if (m_Type == ElementType.Poison)
{
if (_PoisonDrakeDefinition == null)
{
_PoisonDrakeDefinition = new TrainingDefinition(GetType(), Class.None, MagicalAbility.Dragon2, PetTrainingHelper.SpecialAbilityNone, PetTrainingHelper.WepAbility2, PetTrainingHelper.AreaEffectArea2, 2, 5);
}
return _PoisonDrakeDefinition;
}
return base.TrainingDefinition;
}
}
public override bool ReacquireOnMovement { get { return !Controlled; } }
public override int TreasureMapLevel { get { return 2; } }
public override int Meat { get { return 10; } }
public override int DragonBlood { get { return 8; } }
public override int Hides { get { return 22; } }
public override HideType HideType { get { return HideType.Horned; } }
public override int Scales { get { return 2; } }
public override ScaleType ScaleType { get { return ScaleType.Black; } }
public override FoodType FavoriteFood { get { return FoodType.Meat | FoodType.Fish; } }
public override bool CanFly { get { return true; } }
public override void GenerateLoot()
{
AddLoot(LootPack.Rich);
AddLoot(LootPack.MedScrolls, 2);
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0);
writer.Write((int)m_Type);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
m_Type = (ElementType)reader.ReadInt();
}
}
}

View File

@@ -0,0 +1,85 @@
using System;
using Server.Items;
namespace Server.Mobiles
{
[CorpseName("a crystal daemon corpse")]
public class CrystalDaemon : BaseCreature
{
[Constructable]
public CrystalDaemon()
: base(AIType.AI_Mage, FightMode.Closest, 10, 1, 0.2, 0.4)
{
this.Name = "a crystal daemon";
this.Body = 0x310;
this.Hue = 0x3E8;
this.BaseSoundID = 0x47D;
this.SetStr(140, 200);
this.SetDex(120, 150);
this.SetInt(800, 850);
this.SetHits(200, 220);
this.SetDamage(16, 20);
this.SetDamageType(ResistanceType.Physical, 0);
this.SetDamageType(ResistanceType.Cold, 40);
this.SetDamageType(ResistanceType.Energy, 60);
this.SetResistance(ResistanceType.Physical, 20, 40);
this.SetResistance(ResistanceType.Fire, 0, 20);
this.SetResistance(ResistanceType.Cold, 60, 80);
this.SetResistance(ResistanceType.Poison, 20, 40);
this.SetResistance(ResistanceType.Energy, 65, 75);
this.SetSkill(SkillName.Wrestling, 60.0, 80.0);
this.SetSkill(SkillName.Tactics, 70.0, 80.0);
this.SetSkill(SkillName.MagicResist, 100.0, 110.0);
this.SetSkill(SkillName.Magery, 120.0, 130.0);
this.SetSkill(SkillName.EvalInt, 100.0, 110.0);
this.SetSkill(SkillName.Meditation, 100.0, 110.0);
this.Fame = 15000;
this.Karma = -15000;
for (int i = 0; i < Utility.RandomMinMax(0, 1); i++)
{
this.PackItem(Loot.RandomScroll(0, Loot.ArcanistScrollTypes.Length, SpellbookType.Arcanist));
}
}
public override void OnDeath( Container c )
{
base.OnDeath( c );
if ( Utility.RandomDouble() < 0.4 )
c.DropItem( new ScatteredCrystals() );
}
public CrystalDaemon(Serial serial)
: base(serial)
{
}
public override void GenerateLoot()
{
this.AddLoot(LootPack.FilthyRich, 3);
this.AddLoot(LootPack.HighScrolls);
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}

View File

@@ -0,0 +1,94 @@
using System;
using Server.Items;
namespace Server.Mobiles
{
[CorpseName("a crystal elemental corpse")]
public class CrystalElemental : BaseCreature
{
[Constructable]
public CrystalElemental()
: base(AIType.AI_Mage, FightMode.Closest, 10, 1, 0.2, 0.4)
{
Name = "a crystal elemental";
Body = 300;
BaseSoundID = 278;
SetStr(136, 160);
SetDex(51, 65);
SetInt(86, 110);
SetHits(150);
SetDamage(10, 15);
SetDamageType(ResistanceType.Physical, 80);
SetDamageType(ResistanceType.Energy, 20);
SetResistance(ResistanceType.Physical, 50, 60);
SetResistance(ResistanceType.Fire, 40, 50);
SetResistance(ResistanceType.Cold, 40, 50);
SetResistance(ResistanceType.Poison, 100);
SetResistance(ResistanceType.Energy, 55, 70);
SetSkill(SkillName.EvalInt, 70.1, 75.0);
SetSkill(SkillName.Magery, 70.1, 75.0);
SetSkill(SkillName.Meditation, 65.1, 75.0);
SetSkill(SkillName.MagicResist, 80.1, 90.0);
SetSkill(SkillName.Tactics, 75.1, 85.0);
SetSkill(SkillName.Wrestling, 65.1, 75.0);
Fame = 6500;
Karma = -6500;
VirtualArmor = 54;
SetWeaponAbility(WeaponAbility.ParalyzingBlow);
}
public CrystalElemental(Serial serial)
: base(serial)
{
}
public override bool BleedImmune
{
get
{
return true;
}
}
public override Poison PoisonImmune
{
get
{
return Poison.Lethal;
}
}
public override int TreasureMapLevel
{
get
{
return 1;
}
}
public override void GenerateLoot()
{
AddLoot(LootPack.Rich);
AddLoot(LootPack.Average);
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}

View File

@@ -0,0 +1,112 @@
using System;
using Server.Items;
namespace Server.Mobiles
{
[CorpseName("a crystal hydra corpse")]
public class CrystalHydra : BaseCreature
{
[Constructable]
public CrystalHydra()
: base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
{
Name = "a crystal hydra";
Body = 0x109;
Hue = 0x47E;
BaseSoundID = 0x16A;
SetStr(800, 830);
SetDex(100, 120);
SetInt(100, 120);
SetHits(1450, 1500);
SetDamage(21, 26);
SetDamageType(ResistanceType.Physical, 5);
SetDamageType(ResistanceType.Fire, 5);
SetDamageType(ResistanceType.Cold, 80);
SetDamageType(ResistanceType.Poison, 5);
SetDamageType(ResistanceType.Energy, 5);
SetResistance(ResistanceType.Physical, 65, 75);
SetResistance(ResistanceType.Fire, 20, 30);
SetResistance(ResistanceType.Cold, 80, 100);
SetResistance(ResistanceType.Poison, 35, 45);
SetResistance(ResistanceType.Energy, 80, 100);
SetSkill(SkillName.Wrestling, 100.0, 120.0);
SetSkill(SkillName.Tactics, 100.0, 110.0);
SetSkill(SkillName.MagicResist, 80.0, 100.0);
SetSkill(SkillName.Anatomy, 70.0, 80.0);
Fame = 17000;
Karma = -17000;
for (int i = 0; i < Utility.RandomMinMax(0, 1); i++)
{
PackItem(Loot.RandomScroll(0, Loot.ArcanistScrollTypes.Length, SpellbookType.Arcanist));
}
SetSpecialAbility(SpecialAbility.DragonBreath);
}
public CrystalHydra(Serial serial)
: base(serial)
{
}
public override void GenerateLoot()
{
AddLoot(LootPack.UltraRich, 2);
AddLoot(LootPack.HighScrolls);
AddLoot(LootPack.Parrot);
}
public override void OnDeath(Container c)
{
base.OnDeath(c);
if (Utility.RandomDouble() < 0.25)
c.DropItem(new ShatteredCrystals());
c.DropItem(new CrystallineFragments());
}
public override int Hides
{
get
{
return 40;
}
}
public override int Meat
{
get
{
return 19;
}
}
public override int TreasureMapLevel
{
get
{
return 5;
}
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}

View File

@@ -0,0 +1,182 @@
using System;
using Server.Items;
namespace Server.Mobiles
{
[CorpseName("a Crystal Lattice Seeker corpse")]
public class CrystalLatticeSeeker : BaseCreature
{
[Constructable]
public CrystalLatticeSeeker()
: base(AIType.AI_Mage, FightMode.Closest, 10, 1, 0.2, 0.4)
{
this.Name = "Crystal Lattice Seeker";
this.Body = 0x7B;
this.Hue = 0x47E;
this.SetStr(550, 850);
this.SetDex(190, 250);
this.SetInt(350, 450);
this.SetHits(350, 550);
this.SetDamage(13, 19);
this.SetDamageType(ResistanceType.Physical, 100);
this.SetResistance(ResistanceType.Physical, 80, 90);
this.SetResistance(ResistanceType.Fire, 40, 50);
this.SetResistance(ResistanceType.Cold, 40, 50);
this.SetResistance(ResistanceType.Poison, 40, 50);
this.SetResistance(ResistanceType.Energy, 40, 50);
this.SetSkill(SkillName.Anatomy, 50.0, 75.0);
this.SetSkill(SkillName.EvalInt, 90.0, 100.0);
this.SetSkill(SkillName.Magery, 100.0, 100.0);
this.SetSkill(SkillName.Meditation, 90.0, 100.0);
this.SetSkill(SkillName.MagicResist, 90.0, 100.0);
this.SetSkill(SkillName.Tactics, 90.0, 100.0);
this.SetSkill(SkillName.Wrestling, 90.0, 100.0);
this.Fame = 17000;
this.Karma = -17000;
for (int i = 0; i < Utility.RandomMinMax(0, 2); i++)
{
this.PackItem(Loot.RandomScroll(0, Loot.ArcanistScrollTypes.Length, SpellbookType.Arcanist));
}
}
public CrystalLatticeSeeker(Serial serial)
: base(serial)
{
}
public override void OnDeath( Container c )
{
base.OnDeath( c );
if ( Utility.RandomDouble() < 0.75 )
c.DropItem( new CrystallineFragments() );
if ( Utility.RandomDouble() < 0.07 )
c.DropItem( new PiecesOfCrystal() );
}
public override int Feathers
{
get
{
return 100;
}
}
public override int TreasureMapLevel
{
get
{
return 5;
}
}
public override void GenerateLoot()
{
this.AddLoot(LootPack.FilthyRich, 4);
AddLoot( LootPack.Parrot );
this.AddLoot(LootPack.Gems);
this.AddLoot(LootPack.HighScrolls, 2);
}
public override void OnGaveMeleeAttack(Mobile defender)
{
base.OnGaveMeleeAttack(defender);
if (Utility.RandomDouble() < 0.1)
this.Drain(defender);
}
public override void OnGotMeleeAttack(Mobile attacker)
{
base.OnGotMeleeAttack(attacker);
if (Utility.RandomDouble() < 0.1)
this.Drain(attacker);
}
public virtual void Drain(Mobile m)
{
int toDrain;
switch ( Utility.Random(3) )
{
case 0:
{
this.Say(1042156); // I can grant life, and I can sap it as easily.
this.PlaySound(0x1E6);
toDrain = Utility.RandomMinMax(3, 6);
this.Hits += toDrain;
m.Hits -= toDrain;
break;
}
case 1:
{
this.Say(1042157); // You'll go nowhere, unless I deem it should be so.
this.PlaySound(0x1DF);
toDrain = Utility.RandomMinMax(10, 25);
this.Stam += toDrain;
m.Stam -= toDrain;
break;
}
case 2:
{
this.Say(1042155); // Your power is mine to use as I will.
this.PlaySound(0x1F8);
toDrain = Utility.RandomMinMax(15, 25);
this.Mana += toDrain;
m.Mana -= toDrain;
break;
}
}
}
public override int GetAttackSound()
{
return 0x2F6;
}
public override int GetDeathSound()
{
return 0x2F7;
}
public override int GetAngerSound()
{
return 0x2F8;
}
public override int GetHurtSound()
{
return 0x2F9;
}
public override int GetIdleSound()
{
return 0x2FA;
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}

View File

@@ -0,0 +1,74 @@
using System;
using Server.Items;
namespace Server.Mobiles
{
[CorpseName("a crystal sea serpent corpse")]
public class CrystalSeaSerpent : SeaSerpent
{
[Constructable]
public CrystalSeaSerpent()
{
Name = "a crystal sea serpent";
Hue = 0x47E;
SetStr(250, 450);
SetDex(100, 150);
SetInt(90, 190);
SetHits(230, 330);
SetDamage(10, 18);
SetDamageType(ResistanceType.Physical, 10);
SetDamageType(ResistanceType.Cold, 45);
SetDamageType(ResistanceType.Energy, 45);
SetResistance(ResistanceType.Physical, 50, 70);
SetResistance(ResistanceType.Fire, 0);
SetResistance(ResistanceType.Cold, 70, 90);
SetResistance(ResistanceType.Poison, 20, 30);
SetResistance(ResistanceType.Energy, 60, 80);
}
public override void OnDeath( Container c )
{
base.OnDeath( c );
if ( Utility.RandomDouble() < 0.05 )
c.DropItem( new CrushedCrystals() );
if ( Utility.RandomDouble() < 0.1 )
c.DropItem( new IcyHeart() );
if ( Utility.RandomDouble() < 0.1 )
c.DropItem( new LuckyDagger() );
}
public override int TreasureMapLevel { get { return 3; } }
public override int Meat{ get{ return 10; } }
public override int Hides{ get{ return 11; } }
public override HideType HideType{ get{ return HideType.Horned; } }
public override int Scales{ get{ return 8; } }
public override ScaleType ScaleType{ get{ return ScaleType.Blue; } }
public CrystalSeaSerpent(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}

View File

@@ -0,0 +1,98 @@
using System;
using Server.Items;
namespace Server.Mobiles
{
[CorpseName("a crystal vortex corpse")]
public class CrystalVortex : BaseCreature
{
[Constructable]
public CrystalVortex()
: base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
{
this.Name = "a crystal vortex";
this.Body = 0xD;
this.Hue = 0x2B2;
this.BaseSoundID = 0x107;
this.SetStr(800, 900);
this.SetDex(500, 600);
this.SetInt(200);
this.SetHits(350, 400);
this.SetMana(0);
this.SetDamage(15, 20);
this.SetDamageType(ResistanceType.Physical, 0);
this.SetDamageType(ResistanceType.Cold, 50);
this.SetDamageType(ResistanceType.Energy, 50);
this.SetResistance(ResistanceType.Physical, 60, 80);
this.SetResistance(ResistanceType.Fire, 0, 10);
this.SetResistance(ResistanceType.Cold, 70, 80);
this.SetResistance(ResistanceType.Poison, 40, 50);
this.SetResistance(ResistanceType.Energy, 60, 90);
this.SetSkill(SkillName.MagicResist, 120.0);
this.SetSkill(SkillName.Tactics, 120.0);
this.SetSkill(SkillName.Wrestling, 120.0);
this.Fame = 17000;
this.Karma = -17000;
for (int i = 0; i < Utility.RandomMinMax(0, 2); i++)
{
this.PackItem(Loot.RandomScroll(0, Loot.ArcanistScrollTypes.Length, SpellbookType.Arcanist));
}
}
public CrystalVortex(Serial serial)
: base(serial)
{
}
public override void GenerateLoot()
{
this.AddLoot(LootPack.FilthyRich, 2);
AddLoot( LootPack.Parrot );
AddLoot(LootPack.MedScrolls);
AddLoot(LootPack.HighScrolls);
}
public override void OnDeath( Container c )
{
base.OnDeath( c );
if ( Utility.RandomDouble() < 0.75 )
c.DropItem( new CrystallineFragments() );
if ( Utility.RandomDouble() < 0.06 )
c.DropItem( new JaggedCrystals() );
}
public override int GetAngerSound()
{
return 0x15;
}
public override int GetAttackSound()
{
return 0x28;
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}

View File

@@ -0,0 +1,44 @@
using System;
using Server.Items;
namespace Server.Mobiles
{
public class CrystalWisp : Wisp
{
[Constructable]
public CrystalWisp()
{
this.Name = "a crystal wisp";
this.Hue = 0x482;
for (int i = 0; i < Utility.RandomMinMax(0, 1); i++)
{
this.PackItem(Loot.RandomScroll(0, Loot.ArcanistScrollTypes.Length, SpellbookType.Arcanist));
}
}
public CrystalWisp(Serial serial)
: base(serial)
{
}
public override void GenerateLoot()
{
AddLoot(LootPack.MedScrolls);
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}

View File

@@ -0,0 +1,208 @@
using System;
using Server.Items;
namespace Server.Mobiles
{
[CorpseName("a cu sidhe corpse")]
public class CuSidhe : BaseMount
{
public override double HealChance { get { return 1.0; } }
[Constructable]
public CuSidhe()
: this("a cu sidhe")
{
}
[Constructable]
public CuSidhe(string name)
: base(name, 277, 0x3E91, AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
{
double chance = Utility.RandomDouble() * 23301;
if (chance <= 1)
Hue = 0x489;
else if (chance < 50)
Hue = Utility.RandomList(0x657, 0x515, 0x4B1, 0x481, 0x482, 0x455);
else if (chance < 500)
Hue = Utility.RandomList(0x97A, 0x978, 0x901, 0x8AC, 0x5A7, 0x527);
SetStr(1200, 1225);
SetDex(150, 170);
SetInt(250, 285);
SetHits(1010, 1275);
SetDamage(21, 28);
SetDamageType(ResistanceType.Physical, 0);
SetDamageType(ResistanceType.Cold, 50);
SetDamageType(ResistanceType.Energy, 50);
SetResistance(ResistanceType.Physical, 50, 65);
SetResistance(ResistanceType.Fire, 25, 45);
SetResistance(ResistanceType.Cold, 70, 85);
SetResistance(ResistanceType.Poison, 30, 50);
SetResistance(ResistanceType.Energy, 70, 85);
SetSkill(SkillName.Wrestling, 90.1, 96.8);
SetSkill(SkillName.Tactics, 90.3, 99.3);
SetSkill(SkillName.MagicResist, 75.3, 90.0);
SetSkill(SkillName.Anatomy, 65.5, 69.4);
SetSkill(SkillName.Healing, 72.2, 98.9);
Fame = 5000; //Guessing here
Karma = 5000; //Guessing here
Tamable = true;
ControlSlots = 4;
MinTameSkill = 101.1;
PackGold(500, 800);
SetWeaponAbility(WeaponAbility.BleedAttack);
}
public CuSidhe(Serial serial)
: base(serial)
{
}
public override int TreasureMapLevel
{
get { return 5; }
}
public override FoodType FavoriteFood
{
get
{
return FoodType.FruitsAndVegies;
}
}
public override bool CanAngerOnTame
{
get
{
return true;
}
}
public override bool StatLossAfterTame
{
get
{
return true;
}
}
public override int Hides
{
get
{
return 10;
}
}
public override int Meat
{
get
{
return 3;
}
}
public override void GenerateLoot()
{
AddLoot(LootPack.AosFilthyRich, 5);
}
public override void OnAfterTame(Mobile tamer)
{
if (Owners.Count == 0 && PetTrainingHelper.Enabled)
{
if (RawStr > 0)
RawStr = (int)Math.Max(1, RawStr * 0.5);
if (RawDex > 0)
RawDex = (int)Math.Max(1, RawDex * 0.5);
if (HitsMaxSeed > 0)
HitsMaxSeed = (int)Math.Max(1, HitsMaxSeed * 0.5);
Hits = Math.Min(HitsMaxSeed, Hits);
Stam = Math.Min(RawDex, Stam);
}
else
{
base.OnAfterTame(tamer);
}
}
public override void OnDoubleClick(Mobile from)
{
if (from.Race != Race.Elf && from == ControlMaster && from.IsPlayer())
{
Item pads = from.FindItemOnLayer(Layer.Shoes);
if (pads is PadsOfTheCuSidhe)
from.SendLocalizedMessage(1071981); // Your boots allow you to mount the Cu Sidhe.
else
{
from.SendLocalizedMessage(1072203); // Only Elves may use
return;
}
}
base.OnDoubleClick(from);
}
public override int GetIdleSound()
{
return 0x577;
}
public override int GetAttackSound()
{
return 0x576;
}
public override int GetAngerSound()
{
return 0x578;
}
public override int GetHurtSound()
{
return 0x576;
}
public override int GetDeathSound()
{
return 0x579;
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)3); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
if (version < 3 && Controlled && RawStr >= 1200 && ControlSlots == ControlSlotsMin)
{
Server.SkillHandlers.AnimalTaming.ScaleStats(this, 0.5);
}
if (version < 1 && Name == "a Cu Sidhe")
Name = "a cu sidhe";
if (version == 1)
{
SetWeaponAbility(WeaponAbility.BleedAttack);
}
}
}
}

View File

@@ -0,0 +1,100 @@
using System;
using Server.Items;
namespace Server.Mobiles
{
[CorpseName("an inhuman corpse")]
public class Cursed : BaseCreature
{
[Constructable]
public Cursed()
: base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
{
this.Title = "the Cursed";
this.Hue = Utility.RandomMinMax(0x8596, 0x8599);
this.Body = 0x190;
this.Name = NameList.RandomName("male");
this.BaseSoundID = 471;
this.AddItem(new ShortPants(Utility.RandomNeutralHue()));
this.AddItem(new Shirt(Utility.RandomNeutralHue()));
this.SetStr(91, 100);
this.SetDex(86, 95);
this.SetInt(61, 70);
this.SetHits(91, 120);
this.SetDamage(5, 13);
this.SetResistance(ResistanceType.Physical, 15, 25);
this.SetResistance(ResistanceType.Fire, 5, 10);
this.SetResistance(ResistanceType.Cold, 25, 35);
this.SetResistance(ResistanceType.Poison, 5, 10);
this.SetResistance(ResistanceType.Energy, 5, 10);
this.SetSkill(SkillName.Fencing, 46.0, 77.5);
this.SetSkill(SkillName.Macing, 35.0, 57.5);
this.SetSkill(SkillName.MagicResist, 53.5, 62.5);
this.SetSkill(SkillName.Swords, 55.0, 77.5);
this.SetSkill(SkillName.Tactics, 60.0, 82.5);
this.SetSkill(SkillName.Poisoning, 60.0, 82.5);
this.Fame = 1000;
this.Karma = -2000;
BaseWeapon weapon = Loot.RandomWeapon();
weapon.Movable = false;
this.AddItem(weapon);
}
public Cursed(Serial serial)
: base(serial)
{
}
public override bool ClickTitle
{
get
{
return false;
}
}
public override bool ShowFameTitle
{
get
{
return false;
}
}
public override bool AlwaysMurderer
{
get
{
return true;
}
}
public override int GetAttackSound()
{
return -1;
}
public override void GenerateLoot()
{
this.AddLoot(LootPack.Meager);
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}

View File

@@ -0,0 +1,60 @@
using System;
using Server.Items;
using Server.Mobiles;
namespace Server.Engines.Quests.Samurai
{
[CorpseName("a cursed soul corpse")]
public class CursedSoul : BaseCreature
{
[Constructable]
public CursedSoul()
: base(AIType.AI_Melee, FightMode.Aggressor, 10, 1, 0.2, 0.4)
{
Name = "a cursed soul";
Body = 3;
BaseSoundID = 471;
SetStr(20, 40);
SetDex(40, 60);
SetInt(15, 25);
SetHits(10, 20);
SetDamage(3, 7);
SetDamageType(ResistanceType.Physical, 100);
SetResistance(ResistanceType.Physical, 15, 20);
SetResistance(ResistanceType.Fire, 8, 12);
SetSkill(SkillName.Wrestling, 35.0, 39.0);
SetSkill(SkillName.Tactics, 5.0, 15.0);
SetSkill(SkillName.MagicResist, 10.0);
Fame = 200;
Karma = -200;
PackBodyPartOrBones();
}
public CursedSoul(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.WriteEncodedInt(0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadEncodedInt();
}
}
}

View File

@@ -0,0 +1,80 @@
using System;
namespace Server.Mobiles
{
[CorpseName("a cyclopean corpse")]
public class Cyclops : BaseCreature
{
[Constructable]
public Cyclops()
: base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
{
this.Name = "a cyclopean warrior";
this.Body = 75;
this.BaseSoundID = 604;
this.SetStr(336, 385);
this.SetDex(96, 115);
this.SetInt(31, 55);
this.SetHits(202, 231);
this.SetMana(0);
this.SetDamage(7, 23);
this.SetDamageType(ResistanceType.Physical, 100);
this.SetResistance(ResistanceType.Physical, 45, 50);
this.SetResistance(ResistanceType.Fire, 30, 40);
this.SetResistance(ResistanceType.Cold, 25, 35);
this.SetResistance(ResistanceType.Poison, 30, 40);
this.SetResistance(ResistanceType.Energy, 30, 40);
this.SetSkill(SkillName.MagicResist, 60.3, 105.0);
this.SetSkill(SkillName.Tactics, 80.1, 100.0);
this.SetSkill(SkillName.Wrestling, 80.1, 90.0);
this.Fame = 4500;
this.Karma = -4500;
this.VirtualArmor = 48;
}
public Cyclops(Serial serial)
: base(serial)
{
}
public override int Meat
{
get
{
return 4;
}
}
public override int TreasureMapLevel
{
get
{
return 3;
}
}
public override void GenerateLoot()
{
this.AddLoot(LootPack.Rich);
this.AddLoot(LootPack.Average);
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}

View File

@@ -0,0 +1,138 @@
using Server.Ethics;
using Server.Factions;
using Server.Items;
using Server.Services;
namespace Server.Mobiles
{
[CorpseName("a daemon corpse")]
public class Daemon : BaseCreature
{
[Constructable]
public Daemon()
: base(AIType.AI_Mage, FightMode.Closest, 10, 1, 0.2, 0.4)
{
Name = NameList.RandomName("daemon");
Body = 9;
BaseSoundID = 357;
SetStr(476, 505);
SetDex(76, 95);
SetInt(301, 325);
SetHits(286, 303);
SetDamage(7, 14);
SetDamageType(ResistanceType.Physical, 100);
SetResistance(ResistanceType.Physical, 45, 60);
SetResistance(ResistanceType.Fire, 50, 60);
SetResistance(ResistanceType.Cold, 30, 40);
SetResistance(ResistanceType.Poison, 20, 30);
SetResistance(ResistanceType.Energy, 30, 40);
SetSkill(SkillName.EvalInt, 70.1, 80.0);
SetSkill(SkillName.Magery, 70.1, 80.0);
SetSkill(SkillName.MagicResist, 85.1, 95.0);
SetSkill(SkillName.Tactics, 70.1, 80.0);
SetSkill(SkillName.Wrestling, 60.1, 80.0);
Fame = 15000;
Karma = -15000;
VirtualArmor = 58;
switch (Utility.Random(20))
{
case 0:
PackItem(new LichFormScroll());
break;
case 1:
PackItem(new PoisonStrikeScroll());
break;
case 2:
PackItem(new StrangleScroll());
break;
case 3:
PackItem(new VengefulSpiritScroll());
break;
case 4:
PackItem(new WitherScroll());
break;
}
ControlSlots = Core.SE ? 4 : 5;
}
public Daemon(Serial serial)
: base(serial)
{
}
public override double DispelDifficulty
{
get { return 125.0; }
}
public override double DispelFocus
{
get { return 45.0; }
}
public override Faction FactionAllegiance
{
get { return Shadowlords.Instance; }
}
public override Ethic EthicAllegiance
{
get { return Ethic.Evil; }
}
public override bool CanRummageCorpses
{
get { return true; }
}
public override Poison PoisonImmune
{
get { return Poison.Regular; }
}
public override int TreasureMapLevel
{
get { return 4; }
}
public override int Meat
{
get { return 1; }
}
public override bool CanFly
{
get { return true; }
}
public override void GenerateLoot()
{
AddLoot(LootPack.Rich);
AddLoot(LootPack.Average, 2);
AddLoot(LootPack.MedScrolls, 2);
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
var version = reader.ReadInt();
}
}
}

View File

@@ -0,0 +1,84 @@
using System;
using Server;
using Server.Items;
namespace Server.Mobiles
{
[CorpseName("a dark guardians' corpse")]
public class DarkGuardian : BaseCreature
{
[Constructable]
public DarkGuardian()
: base(AIType.AI_NecroMage, FightMode.Closest, 10, 1, 0.2, 0.4)
{
Name = "a dark guardian";
Body = 78;
BaseSoundID = 0x3E9;
SetStr(125, 150);
SetDex(100, 120);
SetInt(200, 235);
SetHits(150, 180);
SetDamage(24, 26);
SetDamageType(ResistanceType.Physical, 10);
SetDamageType(ResistanceType.Cold, 40);
SetDamageType(ResistanceType.Energy, 50);
SetResistance(ResistanceType.Physical, 40, 50);
SetResistance(ResistanceType.Fire, 20, 45);
SetResistance(ResistanceType.Cold, 50, 60);
SetResistance(ResistanceType.Poison, 20, 45);
SetResistance(ResistanceType.Energy, 30, 40);
SetSkill(SkillName.EvalInt, 40.1, 50.0);
SetSkill(SkillName.Magery, 50.1, 60.0);
SetSkill(SkillName.Meditation, 85.0, 95.0);
SetSkill(SkillName.MagicResist, 50.1, 70.0);
SetSkill(SkillName.Tactics, 50.1, 70.0);
SetSkill(SkillName.Necromancy, 100.0, 110.0);
SetSkill(SkillName.SpiritSpeak, 95.0, 105.0);
SetSkill(SkillName.DetectHidden, 55.0, 60.0);
Fame = 5000;
Karma = -5000;
VirtualArmor = 50;
PackNecroReg(15, 25);
}
public DarkGuardian(Serial serial)
: base(serial)
{
}
public override void GenerateLoot()
{
AddLoot(LootPack.Rich);
AddLoot(LootPack.MedScrolls, 2);
}
public override OppositionGroup OppositionGroup
{
get { return OppositionGroup.FeyAndUndead; }
}
public override int TreasureMapLevel { get { return Utility.RandomMinMax(1, 3); } }
public override bool BleedImmune { get { return true; } }
public override Poison PoisonImmune { get { return Poison.Lethal; } }
public override bool Unprovokable { get { return true; } }
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.WriteEncodedInt(0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadEncodedInt();
}
}
}

View File

@@ -0,0 +1,102 @@
using System;
using Server.Items;
using Server.Misc;
namespace Server.Mobiles
{
[CorpseName("a wisp corpse")]
public class DarkWisp : BaseCreature
{
[Constructable]
public DarkWisp()
: base(AIType.AI_NecroMage, FightMode.Closest, 10, 1, 0.2, 0.4)
{
Name = "a wisp";
Body = 165;
BaseSoundID = 466;
SetStr(196, 225);
SetDex(196, 225);
SetInt(196, 225);
SetHits(118, 135);
SetDamage(17, 18);
SetDamageType(ResistanceType.Physical, 50);
SetDamageType(ResistanceType.Energy, 50);
SetResistance(ResistanceType.Physical, 35, 45);
SetResistance(ResistanceType.Fire, 20, 40);
SetResistance(ResistanceType.Cold, 10, 30);
SetResistance(ResistanceType.Poison, 5, 10);
SetResistance(ResistanceType.Energy, 50, 70);
SetSkill(SkillName.EvalInt, 80.0);
SetSkill(SkillName.Magery, 80.0);
SetSkill(SkillName.MagicResist, 80.0);
SetSkill(SkillName.Tactics, 80.0);
SetSkill(SkillName.Wrestling, 80.0);
SetSkill(SkillName.Necromancy, 80.0);
SetSkill(SkillName.SpiritSpeak, 80.0);
Fame = 4000;
Karma = -4000;
VirtualArmor = 40;
AddItem(new LightSource());
}
public DarkWisp(Serial serial)
: base(serial)
{
}
public override InhumanSpeech SpeechType
{
get
{
return InhumanSpeech.Wisp;
}
}
/*public override Ethics.Ethic EthicAllegiance
{
get
{
return Ethics.Ethic.Evil;
}
}*/
public override TimeSpan ReacquireDelay
{
get
{
return TimeSpan.FromSeconds(1.0);
}
}
public override OppositionGroup OppositionGroup
{
get
{
return OppositionGroup.FeyAndUndead;
}
}
public override void GenerateLoot()
{
AddLoot(LootPack.Rich);
AddLoot(LootPack.Average);
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}

View File

@@ -0,0 +1,131 @@
using System;
using Server.Items;
namespace Server.Mobiles
{
[CorpseName("a darknight creeper corpse")]
public class DarknightCreeper : BaseCreature
{
[Constructable]
public DarknightCreeper()
: base(AIType.AI_Mage, FightMode.Closest, 10, 1, 0.2, 0.4)
{
Name = NameList.RandomName("darknight creeper");
Body = 313;
BaseSoundID = 0xE0;
SetStr(301, 330);
SetDex(101, 110);
SetInt(301, 330);
SetHits(4000);
SetDamage(22, 26);
SetDamageType(ResistanceType.Physical, 85);
SetDamageType(ResistanceType.Poison, 15);
SetResistance(ResistanceType.Physical, 60);
SetResistance(ResistanceType.Fire, 60);
SetResistance(ResistanceType.Cold, 100);
SetResistance(ResistanceType.Poison, 90);
SetResistance(ResistanceType.Energy, 75);
SetSkill(SkillName.Wrestling, 90.1, 90.9);
SetSkill(SkillName.Tactics, 100.0);
SetSkill(SkillName.MagicResist, 90.1, 90.9);
SetSkill(SkillName.Poisoning, 120.0);
SetSkill(SkillName.DetectHidden, 100.0);
SetSkill(SkillName.Magery, 112.6, 120.0);
SetSkill(SkillName.EvalInt, 118.1, 120.0);
SetSkill(SkillName.Meditation, 150.0);
Fame = 22000;
Karma = -22000;
VirtualArmor = 34;
}
public DarknightCreeper(Serial serial)
: base(serial)
{
}
public override bool CanFlee { get { return false; } }
public override bool IgnoreYoungProtection
{
get
{
return Core.ML;
}
}
public override bool BardImmune
{
get
{
return !Core.SE;
}
}
public override bool Unprovokable
{
get
{
return Core.SE;
}
}
public override bool AreaPeaceImmune
{
get
{
return Core.SE;
}
}
public override bool BleedImmune
{
get
{
return true;
}
}
public override Poison PoisonImmune
{
get
{
return Poison.Lethal;
}
}
public override Poison HitPoison
{
get
{
return Poison.Lethal;
}
}
public override int TreasureMapLevel
{
get
{
return 1;
}
}
public override void GenerateLoot()
{
AddLoot(LootPack.UltraRich, 2);
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}

View File

@@ -0,0 +1,82 @@
using System;
using Server.Mobiles;
namespace Server.Engines.Quests.Samurai
{
public class DeadlyImp : BaseCreature
{
[Constructable]
public DeadlyImp()
: base(AIType.AI_Melee, FightMode.Aggressor, 10, 1, 0.2, 0.4)
{
this.Name = "a deadly imp";
this.Body = 74;
this.BaseSoundID = 422;
this.Hue = 0x66A;
this.SetStr(91, 115);
this.SetDex(61, 80);
this.SetInt(86, 105);
this.SetHits(1000);
this.SetDamage(50, 80);
this.SetDamageType(ResistanceType.Fire, 100);
this.SetResistance(ResistanceType.Physical, 95, 98);
this.SetResistance(ResistanceType.Fire, 95, 98);
this.SetResistance(ResistanceType.Cold, 95, 98);
this.SetResistance(ResistanceType.Poison, 95, 98);
this.SetResistance(ResistanceType.Energy, 95, 98);
this.SetSkill(SkillName.Magery, 120.0);
this.SetSkill(SkillName.Tactics, 120.0);
this.SetSkill(SkillName.Wrestling, 120.0);
this.Fame = 2500;
this.Karma = -2500;
this.CantWalk = true;
}
public DeadlyImp(Serial serial)
: base(serial)
{
}
public override void AggressiveAction(Mobile aggressor, bool criminal)
{
base.AggressiveAction(aggressor, criminal);
PlayerMobile player = aggressor as PlayerMobile;
if (player != null)
{
QuestSystem qs = player.Quest;
if (qs is HaochisTrialsQuest)
{
QuestObjective obj = qs.FindObjective(typeof(SecondTrialAttackObjective));
if (obj != null && !obj.Completed)
{
obj.Complete();
qs.AddObjective(new SecondTrialReturnObjective(false));
}
}
}
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.WriteEncodedInt(0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadEncodedInt();
}
}
}

View File

@@ -0,0 +1,136 @@
using System;
using Server.Items;
namespace Server.Mobiles
{
[CorpseName("a deathwatchbeetle corpse")]
[TypeAlias("Server.Mobiles.DeathWatchBeetle")]
public class DeathwatchBeetle : BaseCreature
{
[Constructable]
public DeathwatchBeetle()
: base(AIType.AI_Melee, Core.ML ? FightMode.Aggressor : FightMode.Closest, 10, 1, 0.2, 0.4)
{
Name = "a deathwatch beetle";
Body = 242;
SetStr(136, 160);
SetDex(41, 52);
SetInt(31, 40);
SetHits(121, 145);
SetMana(20);
SetDamage(5, 10);
SetDamageType(ResistanceType.Physical, 100);
SetResistance(ResistanceType.Physical, 35, 40);
SetResistance(ResistanceType.Fire, 15, 30);
SetResistance(ResistanceType.Cold, 15, 30);
SetResistance(ResistanceType.Poison, 50, 80);
SetResistance(ResistanceType.Energy, 20, 35);
SetSkill(SkillName.MagicResist, 50.1, 58.0);
SetSkill(SkillName.Tactics, 67.1, 77.0);
SetSkill(SkillName.Wrestling, 50.1, 60.0);
SetSkill(SkillName.Anatomy, 30.1, 34.0);
Fame = 1400;
Karma = -1400;
switch ( Utility.Random(12) )
{
case 0:
PackItem(new LeatherGorget());
break;
case 1:
PackItem(new LeatherGloves());
break;
case 2:
PackItem(new LeatherArms());
break;
case 3:
PackItem(new LeatherLegs());
break;
case 4:
PackItem(new LeatherCap());
break;
case 5:
PackItem(new LeatherChest());
break;
}
if (Utility.RandomDouble() < .5)
PackItem(Engines.Plants.Seed.RandomBonsaiSeed());
Tamable = true;
MinTameSkill = 41.1;
ControlSlots = 1;
SetWeaponAbility(WeaponAbility.CrushingBlow);
SetSpecialAbility(SpecialAbility.PoisonSpit);
}
public DeathwatchBeetle(Serial serial)
: base(serial)
{
}
public override int Hides
{
get
{
return 8;
}
}
public override int GetAngerSound()
{
return 0x4F3;
}
public override int GetIdleSound()
{
return 0x4F2;
}
public override int GetAttackSound()
{
return 0x4F1;
}
public override int GetHurtSound()
{
return 0x4F4;
}
public override int GetDeathSound()
{
return 0x4F0;
}
public override void GenerateLoot()
{
AddLoot(LootPack.LowScrolls, 1);
AddLoot(LootPack.Potions, 1);
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)1);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
if (version == 0)
{
SetWeaponAbility(WeaponAbility.CrushingBlow);
}
}
}
}

View File

@@ -0,0 +1,127 @@
using System;
using Server.Items;
namespace Server.Mobiles
{
[CorpseName("a deathwatchbeetle hatchling corpse")]
[TypeAlias("Server.Mobiles.DeathWatchBeetleHatchling")]
public class DeathwatchBeetleHatchling : BaseCreature
{
[Constructable]
public DeathwatchBeetleHatchling()
: base(AIType.AI_Melee, Core.ML ? FightMode.Aggressor : FightMode.Closest, 10, 1, 0.2, 0.4)
{
this.Name = "a deathwatch beetle hatchling";
this.Body = 242;
this.SetStr(26, 50);
this.SetDex(41, 52);
this.SetInt(21, 30);
this.SetHits(51, 60);
this.SetMana(20);
this.SetDamage(2, 8);
this.SetDamageType(ResistanceType.Physical, 100);
this.SetResistance(ResistanceType.Physical, 35, 40);
this.SetResistance(ResistanceType.Fire, 15, 30);
this.SetResistance(ResistanceType.Cold, 15, 30);
this.SetResistance(ResistanceType.Poison, 20, 40);
this.SetResistance(ResistanceType.Energy, 20, 35);
this.SetSkill(SkillName.Wrestling, 30.1, 40.0);
this.SetSkill(SkillName.Tactics, 47.1, 57.0);
this.SetSkill(SkillName.MagicResist, 30.1, 38.0);
this.SetSkill(SkillName.Anatomy, 20.1, 24.0);
this.Fame = 700;
this.Karma = -700;
if (Utility.RandomBool())
{
Item i = Loot.RandomReagent();
i.Amount = 3;
this.PackItem(i);
}
switch ( Utility.Random(12) )
{
case 0:
this.PackItem(new LeatherGorget());
break;
case 1:
this.PackItem(new LeatherGloves());
break;
case 2:
this.PackItem(new LeatherArms());
break;
case 3:
this.PackItem(new LeatherLegs());
break;
case 4:
this.PackItem(new LeatherCap());
break;
case 5:
this.PackItem(new LeatherChest());
break;
}
}
public DeathwatchBeetleHatchling(Serial serial)
: base(serial)
{
}
public override int Hides
{
get
{
return 8;
}
}
public override int GetAngerSound()
{
return 0x4F3;
}
public override int GetIdleSound()
{
return 0x4F2;
}
public override int GetAttackSound()
{
return 0x4F1;
}
public override int GetHurtSound()
{
return 0x4F4;
}
public override int GetDeathSound()
{
return 0x4F0;
}
public override void GenerateLoot()
{
this.AddLoot(LootPack.LowScrolls, 1);
this.AddLoot(LootPack.Potions, 1);
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}

View File

@@ -0,0 +1,83 @@
using System;
using Server.Items;
namespace Server.Mobiles
{
[CorpseName("a deep sea serpents corpse")]
public class DeepSeaSerpent : BaseCreature
{
[Constructable]
public DeepSeaSerpent()
: base(AIType.AI_Mage, FightMode.Closest, 10, 1, 0.2, 0.4)
{
Name = "a deep sea serpent";
Body = 150;
BaseSoundID = 447;
Hue = Utility.Random(0x8A0, 5);
SetStr(251, 425);
SetDex(87, 135);
SetInt(87, 155);
SetHits(151, 255);
SetDamage(6, 14);
SetDamageType(ResistanceType.Physical, 100);
SetResistance(ResistanceType.Physical, 30, 40);
SetResistance(ResistanceType.Fire, 70, 80);
SetResistance(ResistanceType.Cold, 40, 50);
SetResistance(ResistanceType.Poison, 30, 40);
SetResistance(ResistanceType.Energy, 15, 20);
SetSkill(SkillName.MagicResist, 60.1, 75.0);
SetSkill(SkillName.Tactics, 60.1, 70.0);
SetSkill(SkillName.Wrestling, 60.1, 70.0);
Fame = 6000;
Karma = -6000;
VirtualArmor = 60;
CanSwim = true;
CantWalk = true;
if (Utility.RandomBool())
PackItem(new SulfurousAsh(4));
else
PackItem(new BlackPearl(4));
SetSpecialAbility(SpecialAbility.DragonBreath);
}
public DeepSeaSerpent(Serial serial)
: base(serial)
{
}
public override int TreasureMapLevel { get { return 2; } }
public override int Meat { get { return 10; } }
public override int Hides { get { return 10; } }
public override HideType HideType { get { return HideType.Horned; } }
public override int Scales { get { return 8; } }
public override ScaleType ScaleType { get { return ScaleType.Blue; } }
public override void GenerateLoot()
{
AddLoot(LootPack.Meager);
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}

View File

@@ -0,0 +1,231 @@
using System;
using System.Collections.Generic;
using Server.Items;
using System.Linq;
namespace Server.Mobiles
{
[CorpseName("a demon knight corpse")]
public class DemonKnight : BaseCreature
{
private bool m_InHere;
[Constructable]
public DemonKnight()
: base(AIType.AI_NecroMage, FightMode.Closest, 10, 1, 0.2, 0.4)
{
Name = NameList.RandomName("demon knight");
Title = "the Dark Father";
Body = 318;
BaseSoundID = 0x165;
SetStr(500);
SetDex(100);
SetInt(1000);
SetHits(30000);
SetMana(5000);
SetDamage(17, 21);
SetDamageType(ResistanceType.Physical, 20);
SetDamageType(ResistanceType.Fire, 20);
SetDamageType(ResistanceType.Cold, 20);
SetDamageType(ResistanceType.Poison, 20);
SetDamageType(ResistanceType.Energy, 20);
SetResistance(ResistanceType.Physical, 60, 70);
SetResistance(ResistanceType.Fire, 50, 60);
SetResistance(ResistanceType.Cold, 70, 80);
SetResistance(ResistanceType.Poison, 70, 80);
SetResistance(ResistanceType.Energy, 70, 80);
SetSkill(SkillName.Wrestling, 120.0);
SetSkill(SkillName.Tactics, 100.0);
SetSkill(SkillName.MagicResist, 150.0);
SetSkill(SkillName.DetectHidden, 100.0);
SetSkill(SkillName.Magery, 100.0);
SetSkill(SkillName.EvalInt, 100.0);
SetSkill(SkillName.Meditation, 120.0);
SetSkill(SkillName.Necromancy, 120.0);
SetSkill(SkillName.SpiritSpeak, 120.0);
Fame = 28000;
Karma = -28000;
VirtualArmor = 64;
SetWeaponAbility(WeaponAbility.CrushingBlow);
SetWeaponAbility(WeaponAbility.WhirlwindAttack);
ForceActiveSpeed = 0.38;
ForcePassiveSpeed = 0.66;
}
public DemonKnight(Serial serial)
: base(serial)
{
}
public override bool CanFlee { get { return false; } }
public override bool IgnoreYoungProtection
{
get
{
return Core.ML;
}
}
public override bool BardImmune
{
get
{
return !Core.SE;
}
}
public override bool Unprovokable
{
get
{
return Core.SE;
}
}
public override bool AreaPeaceImmune
{
get
{
return Core.SE;
}
}
public override Poison PoisonImmune
{
get
{
return Poison.Lethal;
}
}
public override int TreasureMapLevel
{
get
{
return 6;
}
}
public override void OnDeath(Container c)
{
List<DamageStore> rights = GetLootingRights();
int top = 0;
Item blood = null;
foreach (Mobile m in rights.Select(x => x.m_Mobile).Distinct().Take(3))
{
if (top == 0)
blood = new BloodOfTheDarkFather(5);
else if (top == 1)
blood = new BloodOfTheDarkFather(3);
else if (top == 2)
blood = new BloodOfTheDarkFather(2);
top++;
if (m.Backpack == null || !m.Backpack.TryDropItem(m, blood, false))
{
m.BankBox.DropItem(blood);
}
}
base.OnDeath(c);
}
public static Mobile FindRandomPlayer(BaseCreature creature)
{
List<DamageStore> rights = creature.GetLootingRights();
for (int i = rights.Count - 1; i >= 0; --i)
{
DamageStore ds = rights[i];
if (!ds.m_HasRight)
rights.RemoveAt(i);
}
if (rights.Count > 0)
return rights[Utility.Random(rights.Count)].m_Mobile;
return null;
}
public override bool TeleportsTo { get { return true; } }
public override void GenerateLoot()
{
AddLoot(LootPack.SuperBoss, 2);
AddLoot(LootPack.HighScrolls, Utility.RandomMinMax(6, 60));
}
public override void OnDamage(int amount, Mobile from, bool willKill)
{
if (from != null && from != this && !m_InHere)
{
m_InHere = true;
AOS.Damage(from, this, Utility.RandomMinMax(8, 20), 100, 0, 0, 0, 0);
MovingEffect(from, 0xECA, 10, 0, false, false, 0, 0);
PlaySound(0x491);
if (0.05 > Utility.RandomDouble())
Timer.DelayCall(TimeSpan.FromSeconds(1.0), new TimerStateCallback(CreateBones_Callback), from);
m_InHere = false;
}
}
public virtual void CreateBones_Callback(object state)
{
Mobile from = (Mobile)state;
Map map = from.Map;
if (map == null)
return;
int count = Utility.RandomMinMax(1, 3);
for (int i = 0; i < count; ++i)
{
int x = from.X + Utility.RandomMinMax(-1, 1);
int y = from.Y + Utility.RandomMinMax(-1, 1);
int z = from.Z;
if (!map.CanFit(x, y, z, 16, false, true))
{
z = map.GetAverageZ(x, y);
if (z == from.Z || !map.CanFit(x, y, z, 16, false, true))
continue;
}
UnholyBone bone = new UnholyBone();
bone.Hue = 0;
bone.Name = "unholy bones";
bone.ItemID = Utility.Random(0xECA, 9);
bone.MoveToWorld(new Point3D(x, y, z), map);
}
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}

View File

@@ -0,0 +1,86 @@
using System;
namespace Server.Mobiles
{
[CorpseName("an ostard corpse")]
public class DesertOstard : BaseMount
{
[Constructable]
public DesertOstard()
: this("a desert ostard")
{
}
[Constructable]
public DesertOstard(string name)
: base(name, 0xD2, 0x3EA3, AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
{
this.BaseSoundID = 0x270;
this.SetStr(94, 170);
this.SetDex(56, 75);
this.SetInt(6, 10);
this.SetHits(71, 88);
this.SetMana(0);
this.SetDamage(5, 11);
this.SetDamageType(ResistanceType.Physical, 100);
this.SetResistance(ResistanceType.Physical, 15, 20);
this.SetResistance(ResistanceType.Fire, 5, 15);
this.SetSkill(SkillName.MagicResist, 25.1, 30.0);
this.SetSkill(SkillName.Tactics, 25.3, 40.0);
this.SetSkill(SkillName.Wrestling, 29.3, 44.0);
this.Fame = 450;
this.Karma = 0;
this.Tamable = true;
this.ControlSlots = 1;
this.MinTameSkill = 29.1;
}
public DesertOstard(Serial serial)
: base(serial)
{
}
public override int Meat
{
get
{
return 3;
}
}
public override FoodType FavoriteFood
{
get
{
return FoodType.FruitsAndVegies | FoodType.GrainsAndHay;
}
}
public override PackInstinct PackInstinct
{
get
{
return PackInstinct.Ostard;
}
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}

View File

@@ -0,0 +1,432 @@
using Server;
using System;
using Server.Items;
using Server.Mobiles;
using Server.Network;
using Server.SkillHandlers;
namespace Server.Mobiles
{
public enum Alignment
{
Neutral,
Good,
Evil
}
}
namespace Server.Engines.Despise
{
public class DespiseCreature : BaseCreature
{
private WispOrb m_Orb;
private int m_Power;
private int m_MaxPower;
private int m_Progress;
[CommandProperty(AccessLevel.GameMaster)]
public virtual Alignment Alignment
{
get
{
if (Karma > 0)
return Alignment.Good;
if (Karma < 0)
return Alignment.Evil;
return Alignment.Neutral;
}
}
[CommandProperty(AccessLevel.GameMaster)]
public WispOrb Orb { get { return m_Orb; } set { m_Orb = value; } }
[CommandProperty(AccessLevel.GameMaster)]
public int MaxPower { get { return m_MaxPower; } set { m_MaxPower = value; } }
[CommandProperty(AccessLevel.GameMaster)]
public int Power
{
get { return m_Power; }
set
{
int oldPower = m_Power;
if (value > m_MaxPower)
m_Power = m_MaxPower;
if (oldPower < value)
{
m_Power = value;
IncreasePower();
InvalidateProperties();
}
if (m_Orb != null)
m_Orb.InvalidateProperties();
}
}
[CommandProperty(AccessLevel.GameMaster)]
public int Progress
{
get { return m_Progress; }
set
{
m_Progress = value;
if (m_Progress >= m_Power)
{
Power++;
IncreaseResists();
m_Progress = 0;
}
if (m_Orb != null)
m_Orb.InvalidateProperties();
}
}
public virtual int TightLeashLength { get { return 1; } }
public virtual int ShortLeashLength { get { return 1; } }
public virtual int LongLeashLength { get { return 10; } }
public virtual int StatRatio { get { return Utility.RandomMinMax(35, 60); } }
public virtual double SkillStart { get { return Utility.RandomMinMax(80.0, 130.0); } }
public virtual double SkillMax { get { return m_MaxPower == 15 ? 130.0 : 110.0; } }
public virtual int StrStart { get { return Utility.RandomMinMax(91, 100); } }
public virtual int DexStart { get { return Utility.RandomMinMax(91, 100); } }
public virtual int IntStart { get { return Utility.RandomMinMax(91, 100); } }
public virtual int StrMax { get { return 600; } }
public virtual int DexMax { get { return 150; } }
public virtual int IntMax { get { return 450; } }
public virtual int HitsStart { get { return StrStart + (int)((double)StrStart * ((double)StatRatio / 100.0)); } }
public virtual int StamStart { get { return DexStart + (int)((double)DexStart * ((double)StatRatio / 100.0)); } }
public virtual int ManaStart { get { return IntStart + (int)((double)IntStart * ((double)StatRatio / 100.0)); } }
public virtual int MaxHits { get { return 1000; } }
public virtual int MaxStam { get { return 1000; } }
public virtual int MaxMana { get { return 1500; } }
public virtual int MinDamStart { get { return 8; } }
public virtual int MaxDamStart { get { return 13; } }
public virtual int MinDamMax { get { return 12; } }
public virtual int MaxDamMax { get { return 17; } }
public virtual bool RaiseDamage { get { return false; } }
public virtual double RaiseDamageFactor { get { return 0.33; } }
public virtual int GetFame { get { return m_Power * 500; } }
public virtual int GetKarmaGood { get { return m_Power * 500; } }
public virtual int GetKarmaEvil { get { return m_Power * -500; } }
public override bool Commandable { get { return false; } }
public override bool InitialInnocent { get { return Alignment < Alignment.Evil; } }
public override bool AlwaysMurderer { get { return Alignment == Alignment.Evil; } }
public override bool ForceNotoriety { get { return true; } }
public override bool IsBondable { get { return false; } }
public override bool GivesFameAndKarmaAward { get { return false; } }
public override bool CanAutoStable { get { return false; } }
public override Poison GetHitPoison()
{
return null;
}
public override TimeSpan ReacquireDelay
{
get
{
if (!Controlled || m_Orb == null || m_Orb.Aggression == Aggression.Defensive)
{
return TimeSpan.FromSeconds(10.0);
}
else
{
return TimeSpan.FromSeconds(Utility.RandomMinMax(4, 6));
}
}
}
public DespiseCreature(AIType ai, FightMode fightmode)
: base(ai, fightmode, 10, 1, .2, .4)
{
m_MaxPower = 10;
m_Power = 1;
SetStr(StrStart);
SetDex(DexStart);
SetInt(IntStart);
SetHits(HitsStart);
SetStam(StamStart);
SetMana(ManaStart);
SetDamageType(ResistanceType.Physical, 100);
SetResistance(ResistanceType.Physical, 5, 50);
SetResistance(ResistanceType.Fire, 5, 50);
SetResistance(ResistanceType.Cold, 5, 50);
SetResistance(ResistanceType.Poison, 5, 50);
SetResistance(ResistanceType.Energy, 5, 50);
SetSkill(SkillName.Wrestling, SkillStart);
SetSkill(SkillName.Tactics, SkillStart);
SetSkill(SkillName.MagicResist, SkillStart);
SetSkill(SkillName.Anatomy, SkillStart);
SetSkill(SkillName.Poisoning, SkillStart);
SetSkill(SkillName.DetectHidden, SkillStart);
SetSkill(SkillName.Parry, SkillStart);
SetSkill(SkillName.Magery, SkillStart);
SetSkill(SkillName.EvalInt, SkillStart);
SetSkill(SkillName.Meditation, SkillStart);
SetSkill(SkillName.Necromancy, SkillStart);
SetSkill(SkillName.SpiritSpeak, SkillStart);
SetSkill(SkillName.Focus, SkillStart);
SetSkill(SkillName.Discordance, SkillStart);
NoLootOnDeath = true;
SetDamage(MinDamStart, MaxDamStart);
}
public override bool IsEnemy(Mobile m)
{
if (m is PlayerMobile)
{
if (m.Karma <= 1000 && Alignment == Alignment.Good)
return true;
if (m.Karma >= 1000 && Alignment == Alignment.Evil)
return true;
}
else if (m is DespiseCreature)
{
return ((DespiseCreature)m).Alignment != this.Alignment;
}
return false;
}
public override bool CanBeRenamedBy(Mobile from)
{
if (from.AccessLevel > AccessLevel.Player)
return base.CanBeRenamedBy(from);
return false;
}
public override void GetContextMenuEntries(Mobile from, System.Collections.Generic.List<Server.ContextMenus.ContextMenuEntry> list)
{
}
public override void GetProperties(ObjectPropertyList list)
{
base.GetProperties(list);
if (ControlMaster != null)
list.Add(1153303, ControlMaster.Name); // Controller: ~1_NAME~
list.Add(1153297, String.Format("{0}\t#{1}", m_Power.ToString(), GetPowerLabel(m_Power))); // Power Level: ~1_LEVEL~: ~2_VAL~
}
public override void OnCombatantChange()
{
base.OnCombatantChange();
if (m_Orb != null)
m_Orb.InvalidateHue();
}
public override void OnKarmaChange(int oldValue)
{
if ((oldValue < 0 && Karma > 0) || (oldValue > 0 && Karma < 0))
{
switch (Alignment)
{
case Alignment.Good: FightMode = FightMode.Evil; break;
case Alignment.Evil: FightMode = FightMode.Good; break;
default: FightMode = FightMode.Aggressor; break;
}
}
}
public override void OnDeath(Container c)
{
base.OnDeath(c);
if (m_Orb != null)
{
Unlink(false);
}
}
public override void Delete()
{
base.Delete();
if (m_Orb != null && !m_Orb.Deleted)
m_Orb.Pet = null;
}
public int GetLeashLength()
{
if (m_Orb == null)
return RangePerception;
switch (m_Orb.LeashLength)
{
default:
case LeashLength.Short: return ShortLeashLength;
case LeashLength.Long: return LongLeashLength;
}
}
public void Link(WispOrb orb)
{
m_Orb = orb;
RangeHome = 2;
m_Orb.InvalidateHue();
}
public void Unlink(bool message = true)
{
RangeHome = 10;
SetControlMaster(null);
if (Alive && message)
{
if (m_Orb != null && m_Orb.Owner != null)
{
m_Orb.Owner.SendLocalizedMessage(1153335, Name); // You have released control of ~1_NAME~.
NonlocalOverheadMessage(MessageType.Regular, 0x59, 1153296, Name); // * This creature is no longer influenced by a Wisp Orb *
}
}
if (m_Orb != null)
{
m_Orb.Conscripted = false;
m_Orb.OnUnlinkPet();
m_Orb.InvalidateHue();
m_Orb = null;
}
}
public virtual void IncreasePower()
{
foreach (Skill skill in Skills)
{
if (skill != null && skill.Base > 0 && skill.Base < SkillMax)
{
double toRaise = ((SkillMax / m_MaxPower) * m_Power) + Utility.RandomMinMax(-5, 5);
if (toRaise > skill.Base)
skill.Base = Math.Min(SkillMax, toRaise);
}
}
int strRaise = ((StrMax / 15) * m_Power) + Utility.RandomMinMax(-5, 5);
int dexRaise = ((DexMax / 15) * m_Power) + Utility.RandomMinMax(-5, 5);
int intRaise = ((IntMax / 15) * m_Power) + Utility.RandomMinMax(-5, 5);
if (strRaise > RawStr)
SetStr(Math.Min(StrMax, strRaise));
if (dexRaise > RawDex)
SetDex(Math.Min(DexMax, dexRaise));
if (intRaise > RawInt)
SetInt(Math.Min(IntMax, intRaise));
int hitsRaise = ((MaxHits / 15) * m_Power) + Utility.RandomMinMax(-5, 5);
int stamRaise = ((MaxStam / 15) * m_Power) + Utility.RandomMinMax(-5, 5);
int manaRaise = ((MaxMana / 15) * m_Power) + Utility.RandomMinMax(-5, 5);
if (hitsRaise > HitsMax)
SetHits(Math.Min(MaxHits, hitsRaise));
if (stamRaise > StamMax)
SetStam(Math.Min(MaxStam, stamRaise));
if (manaRaise > ManaMax)
SetMana(Math.Min(MaxMana, manaRaise));
if (RaiseDamage && Utility.RandomDouble() < RaiseDamageFactor)
{
DamageMin = Math.Min(MinDamMax, DamageMin + 1);
DamageMax = Math.Min(MaxDamMax, DamageMax + 1);
}
FixedEffect(0x373A, 10, 30);
PlaySound(0x209);
}
private void IncreaseResists()
{
SetResistance(ResistanceType.Physical, Math.Min(80, PhysicalResistanceSeed + Utility.RandomMinMax(5, 15)));
SetResistance(ResistanceType.Fire, Math.Min(80, FireResistSeed + Utility.RandomMinMax(5, 15)));
SetResistance(ResistanceType.Cold, Math.Min(80, ColdResistSeed + Utility.RandomMinMax(5, 15)));
SetResistance(ResistanceType.Poison, Math.Min(80, PoisonResistSeed + Utility.RandomMinMax(5, 15)));
SetResistance(ResistanceType.Energy, Math.Min(80, EnergyResistSeed + Utility.RandomMinMax(5, 15)));
}
public static int GetPowerLabel(int power)
{
switch (power)
{
default:
case 0:
case 1:
case 3: return 1153298; // Normal
case 4:
case 5:
case 6: return 1153299; // Improved
case 7:
case 8: return 1153300; // Heightened
case 9:
case 10: return 1153301; // Magnified
case 11:
case 12: return 1153302; // Amplified
case 13:
case 14: return 1153307; // Inspired
case 15: return 1153308; // Galvanized
}
}
public DespiseCreature(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0);
writer.Write(m_Orb);
writer.Write(m_Power);
writer.Write(m_MaxPower);
writer.Write(m_Progress);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int v = reader.ReadInt();
m_Orb = reader.ReadItem() as WispOrb;
m_Power = reader.ReadInt();
m_MaxPower = reader.ReadInt();
m_Progress = reader.ReadInt();
if (!NoLootOnDeath)
NoLootOnDeath = true;
}
}
}

View File

@@ -0,0 +1,510 @@
using Server;
using System;
using Server.Items;
using Server.Mobiles;
using System.Collections.Generic;
using Server.Spells;
namespace Server.Engines.Despise
{
public class Phantom : DespiseCreature
{
[Constructable]
public Phantom() : this(1)
{
}
[Constructable]
public Phantom(int powerLevel) : base(AIType.AI_Melee, FightMode.Good)
{
Name = "Phantom";
Body = 0xFC;
BaseSoundID = 0x482;
Hue = 2671;
Fame = GetFame;
Karma = GetKarmaEvil;
Power = powerLevel;
SetMagicalAbility(MagicalAbility.Discordance);
}
protected override BaseAI ForcedAI { get { return new DespiseMeleeAI(this); } }
public override int StrStart { get { return Utility.RandomMinMax(65, 75); } }
public override int DexStart { get { return Utility.RandomMinMax(100, 110); } }
public override int IntStart { get { return Utility.RandomMinMax(100, 110); } }
public override Mobile GetBardTarget(bool creaturesOnly = false)
{
IPooledEnumerable eable = this.Map.GetMobilesInRange(this.Location, RangePerception);
Mobile closest = null;
int range = 0;
foreach (Mobile m in eable)
{
if (CanDoTarget(m))
{
int dist = (int)GetDistanceToSqrt(m);
if (closest == null || dist < range)
{
closest = m;
range = dist;
}
}
}
eable.Free();
return closest;
}
private bool CanDoTarget(Mobile m)
{
int discordanceEffect = 0;
if (!CanBeHarmful(m, false) || Server.SkillHandlers.Discordance.GetEffect(m, ref discordanceEffect))
return false;
if ((m is DespiseCreature && ((DespiseCreature)m).Alignment != Alignment.Neutral && ((DespiseCreature)m).Alignment != this.Alignment) || m is DespiseBoss)
return true;
return m is PlayerMobile && !this.Controlled && ((m.Karma < 0 && this.Alignment == Alignment.Good) || (m.Karma > 0 && this.Alignment == Alignment.Evil));
}
public Phantom(Serial serial) : base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int v = reader.ReadInt();
}
}
public class Naba : DespiseCreature
{
[Constructable]
public Naba() : this(1)
{
}
[Constructable]
public Naba(int powerLevel) : base(AIType.AI_Mage, FightMode.Good)
{
Name = "Naba";
Body = 0x88;
BaseSoundID = 639;
Hue = 2707;
Fame = GetFame;
Karma = GetKarmaEvil;
Power = powerLevel;
}
protected override BaseAI ForcedAI { get { return new DespiseMageAI(this); } }
public override int StrStart { get { return Utility.RandomMinMax(65, 80); } }
public override int DexStart { get { return Utility.RandomMinMax(70, 80); } }
public override int IntStart { get { return Utility.RandomMinMax(110, 150); } }
public Naba(Serial serial) : base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int v = reader.ReadInt();
}
}
public class Darkmane : DespiseCreature
{
[Constructable]
public Darkmane() : this(1)
{
}
[Constructable]
public Darkmane(int powerLevel) : base(AIType.AI_Melee, FightMode.Good)
{
Name = "Darkmane";
Body = 0xCC;
Hue = 1910;
BaseSoundID = 0xA8;
Fame = GetFame;
Karma = GetKarmaEvil;
Power = powerLevel;
SetWeaponAbility(WeaponAbility.ArmorIgnore);
}
protected override BaseAI ForcedAI { get { return new DespiseMeleeAI(this); } }
public override int StrStart { get { return Utility.RandomMinMax(80, 100); } }
public override int DexStart { get { return Utility.RandomMinMax(110, 115); } }
public override int IntStart { get { return Utility.RandomMinMax(100, 115); } }
public override bool RaiseDamage { get { return true; } }
public override double WeaponAbilityChance { get { return 0.5; } }
public Darkmane(Serial serial) : base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)1);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int v = reader.ReadInt();
if (v == 0)
{
SetWeaponAbility(WeaponAbility.ArmorIgnore);
}
}
}
public class Skeletrex : DespiseCreature
{
[Constructable]
public Skeletrex() : this(1)
{
}
[Constructable]
public Skeletrex(int powerLevel) : base(AIType.AI_Archer, FightMode.Good)
{
Name = "Skeletrex";
Body = 147;
BaseSoundID = 451;
Hue = 2075;
SetSkill(SkillName.Archery, SkillStart);
Fame = GetFame;
Karma = GetKarmaEvil;
AddItem(new Bow());
PackItem(new Arrow(Utility.RandomMinMax(5, 10))); // OSI it is different: in a sub backpack, this is probably just a limitation of their engine
Power = powerLevel;
}
protected override BaseAI ForcedAI { get { return new DespiseMeleeAI(this); } }
public override int StrStart { get { return Utility.RandomMinMax(40, 55); } }
public override int DexStart { get { return Utility.RandomMinMax(160, 180); } }
public override int IntStart { get { return Utility.RandomMinMax(110, 120); } }
public override bool RaiseDamage { get { return true; } }
public Skeletrex(Serial serial) : base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int v = reader.ReadInt();
}
}
public class Hellion : DespiseCreature
{
[Constructable]
public Hellion() : this(1)
{
}
[Constructable]
public Hellion(int powerLevel) : base(AIType.AI_Melee, FightMode.Good)
{
Name = "Hellion";
Body = 4;
BaseSoundID = 0x174;
Hue = 2671;
Fame = GetFame;
Karma = GetKarmaEvil;
Power = powerLevel;
SetWeaponAbility(WeaponAbility.CrushingBlow);
}
protected override BaseAI ForcedAI { get { return new DespiseMeleeAI(this); } }
public override PackInstinct PackInstinct { get { return PackInstinct.Bear; } }
public override int MinDamMax { get { return 15; } }
public override int MaxDamMax { get { return 26; } }
public override bool RaiseDamage { get { return true; } }
public override int StrStart { get { return Utility.RandomMinMax(150, 175); } }
public override int DexStart { get { return Utility.RandomMinMax(90, 105); } }
public override int IntStart { get { return Utility.RandomMinMax(30, 40); } }
public override double WeaponAbilityChance { get { return 0.5; } }
public Hellion(Serial serial) : base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)1);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int v = reader.ReadInt();
if (v == 0)
{
SetWeaponAbility(WeaponAbility.CrushingBlow);
}
}
}
public class Echidnite : DespiseCreature
{
[Constructable]
public Echidnite() : this(1)
{
}
[Constructable]
public Echidnite(int powerLevel) : base(AIType.AI_Melee, FightMode.Good)
{
Name = "Echidnite";
Body = 250;
BaseSoundID = 0x52A;
Hue = 2671;
Fame = GetFame;
Karma = GetKarmaEvil;
Power = powerLevel;
SetWeaponAbility(WeaponAbility.ConcussionBlow);
}
protected override BaseAI ForcedAI { get { return new DespiseMeleeAI(this); } }
public override bool RaiseDamage { get { return true; } }
public override int StrStart { get { return Utility.RandomMinMax(150, 175); } }
public override int DexStart { get { return Utility.RandomMinMax(120, 130); } }
public override int IntStart { get { return Utility.RandomMinMax(50, 60); } }
public override double WeaponAbilityChance { get { return 0.5; } }
public Echidnite(Serial serial) : base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int v = reader.ReadInt();
if (v == 0)
{
SetWeaponAbility(WeaponAbility.ConcussionBlow);
}
}
}
[TypeAlias("Server.Engines.Despise.BerlingBlades")]
public class BirlingBlades : DespiseCreature
{
[Constructable]
public BirlingBlades() : this(1)
{
}
[Constructable]
public BirlingBlades(int powerLevel) : base(AIType.AI_Melee, FightMode.Good)
{
Name = "Birling Blades";
Body = 574;
BaseSoundID = 224;
Hue = 2672;
Fame = GetFame;
Karma = GetKarmaEvil;
Power = powerLevel;
SetWeaponAbility(WeaponAbility.DoubleStrike);
}
protected override BaseAI ForcedAI { get { return new DespiseMeleeAI(this); } }
public override bool RaiseDamage { get { return true; } }
public override int StrStart { get { return Utility.RandomMinMax(100, 120); } }
public override int DexStart { get { return Utility.RandomMinMax(140, 155); } }
public override int IntStart { get { return Utility.RandomMinMax(30, 50); } }
public override double WeaponAbilityChance { get { return 0.5; } }
public override int GetAngerSound()
{
return 0x23A;
}
public override int GetAttackSound()
{
return 0x3B8;
}
public override int GetHurtSound()
{
return 0x23A;
}
public BirlingBlades(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)1);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int v = reader.ReadInt();
if (v == 0)
{
SetWeaponAbility(WeaponAbility.DoubleStrike);
}
}
}
public class Prometheoid : DespiseCreature
{
private DateTime m_NextHeal;
private readonly double HealThreshold = 0.5;
public virtual int MinHeal { get { return Math.Max(10, Power * 3); } }
public virtual int MaxHeal { get { return Math.Max(25, Power * 5); } }
[Constructable]
public Prometheoid() : this(1)
{
}
[Constructable]
public Prometheoid(int powerLevel) : base(AIType.AI_Melee, FightMode.Good)
{
Name = "Prometheoid";
Body = 305;
BaseSoundID = 224;
Hue = 2671;
Fame = GetFame;
Karma = GetKarmaEvil;
m_NextHeal = DateTime.UtcNow;
Power = powerLevel;
}
protected override BaseAI ForcedAI { get { return new DespiseMeleeAI(this); } }
public override int StrStart { get { return Utility.RandomMinMax(85, 100); } }
public override int DexStart { get { return Utility.RandomMinMax(110, 125); } }
public override int IntStart { get { return Utility.RandomMinMax(130, 150); } }
public override void OnThink()
{
base.OnThink();
if (m_NextHeal < DateTime.UtcNow && this.Map != null && this.Map != Map.Internal)
{
List<Mobile> eligables = new List<Mobile>();
IPooledEnumerable eable = this.Map.GetMobilesInRange(this.Location, 8);
foreach (Mobile m in eable)
{
if (m.Alive && m.Hits <= (int)((double)m.HitsMax * HealThreshold) && CanDoHeal(m))
eligables.Add(m);
}
if (eligables.Count > 0)
{
Mobile m = eligables[Utility.Random(eligables.Count)];
Direction = GetDirectionTo(m);
SpellHelper.Heal(Utility.RandomMinMax(MinHeal, MaxHeal), m, this);
m.FixedParticles(0x376A, 9, 32, 5030, EffectLayer.Waist);
m.PlaySound(0x202);
int nextHeal = Utility.RandomMinMax(20 - Power, 30 - Power);
m_NextHeal = DateTime.UtcNow + TimeSpan.FromSeconds(nextHeal);
return;
}
m_NextHeal = DateTime.UtcNow + TimeSpan.FromSeconds(5);
}
}
private bool CanDoHeal(Mobile toHeal)
{
if (toHeal is DespiseCreature && ((DespiseCreature)toHeal).Alignment == Alignment)
return true;
return toHeal is PlayerMobile && ((toHeal.Karma < 0 && Alignment == Alignment.Evil) || (toHeal.Karma > 0 && Alignment == Alignment.Good));
}
public Prometheoid(Serial serial) : base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int v = reader.ReadInt();
m_NextHeal = DateTime.UtcNow;
}
}
}

View File

@@ -0,0 +1,503 @@
using Server;
using System;
using Server.Items;
using Server.Mobiles;
using System.Collections.Generic;
using Server.Spells;
namespace Server.Engines.Despise
{
public class Silenii : DespiseCreature
{
[Constructable]
public Silenii() : this(1)
{
}
[Constructable]
public Silenii(int powerLevel) : base(AIType.AI_Melee, FightMode.Evil)
{
Name = "Silenii";
Body = 0x10F;
BaseSoundID = 0x585;
Fame = GetFame;
Karma = GetKarmaGood;
Power = powerLevel;
SetMagicalAbility(MagicalAbility.Discordance);
}
protected override BaseAI ForcedAI { get { return new DespiseMeleeAI(this); } }
public override int StrStart { get { return Utility.RandomMinMax(65, 75); } }
public override int DexStart { get { return Utility.RandomMinMax(100, 110); } }
public override int IntStart { get { return Utility.RandomMinMax(100, 110); } }
public override Mobile GetBardTarget(bool creaturesOnly = false)
{
IPooledEnumerable eable = this.Map.GetMobilesInRange(this.Location, RangePerception);
Mobile closest = null;
int range = 0;
foreach (Mobile m in eable)
{
if (CanDoTarget(m))
{
int dist = (int)GetDistanceToSqrt(m);
if (closest == null || dist < range)
{
closest = m;
range = dist;
}
}
}
eable.Free();
return closest;
}
private bool CanDoTarget(Mobile m)
{
int discordanceEffect = 0;
if (!CanBeHarmful(m, false) || Server.SkillHandlers.Discordance.GetEffect(m, ref discordanceEffect))
return false;
if ((m is DespiseCreature && ((DespiseCreature)m).Alignment != Alignment.Neutral && ((DespiseCreature)m).Alignment != this.Alignment) || m is DespiseBoss)
return true;
return m is PlayerMobile && !this.Controlled && ((m.Karma < 0 && this.Alignment == Alignment.Good) || (m.Karma > 0 && this.Alignment == Alignment.Evil));
}
public Silenii(Serial serial) : base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int v = reader.ReadInt();
}
}
public class ForestNymph : DespiseCreature
{
[Constructable]
public ForestNymph() : this(1)
{
}
[Constructable]
public ForestNymph(int powerLevel) : base(AIType.AI_Mage, FightMode.Evil)
{
Name = "Forest Nymph";
Body = 266;
BaseSoundID = 0x467;
Fame = GetFame;
Karma = GetKarmaGood;
Power = powerLevel;
}
protected override BaseAI ForcedAI { get { return new DespiseMageAI(this); } }
public override int StrStart { get { return Utility.RandomMinMax(65, 80); } }
public override int DexStart { get { return Utility.RandomMinMax(70, 80); } }
public override int IntStart { get { return Utility.RandomMinMax(110, 150); } }
public ForestNymph(Serial serial) : base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int v = reader.ReadInt();
}
}
public class DespiseUnicorn : DespiseCreature
{
[Constructable]
public DespiseUnicorn() : this(1)
{
}
[Constructable]
public DespiseUnicorn(int powerLevel) : base(AIType.AI_Melee, FightMode.Evil)
{
Name = "Unicorn";
Body = 0x7A;
BaseSoundID = 0x4BC;
Fame = GetFame;
Karma = GetKarmaGood;
Power = powerLevel;
SetWeaponAbility(WeaponAbility.ArmorIgnore);
}
protected override BaseAI ForcedAI { get { return new DespiseMeleeAI(this); } }
public override int StrStart { get { return Utility.RandomMinMax(80, 100); } }
public override int DexStart { get { return Utility.RandomMinMax(110, 115); } }
public override int IntStart { get { return Utility.RandomMinMax(100, 115); } }
public override bool RaiseDamage { get { return true; } }
public override double WeaponAbilityChance { get { return 0.5; } }
public DespiseUnicorn(Serial serial) : base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)1);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int v = reader.ReadInt();
if (v == 0)
{
SetWeaponAbility(WeaponAbility.ArmorIgnore);
}
}
}
[TypeAlias("Server.Engines.Despise.Sagittari")]
public class Sagittarri : DespiseCreature
{
[Constructable]
public Sagittarri() : this(1)
{
}
[Constructable]
public Sagittarri(int powerLevel) : base(AIType.AI_Archer, FightMode.Evil)
{
Name = "Sagittarri";
Body = 101;
BaseSoundID = 679;
SetSkill(SkillName.Archery, SkillStart);
Fame = GetFame;
Karma = GetKarmaGood;
AddItem(new Bow());
PackItem(new Arrow(Utility.RandomMinMax(5, 10)));
Power = powerLevel;
RangeFight = 8;
}
protected override BaseAI ForcedAI { get { return new DespiseMeleeAI(this); } }
public override int StrStart { get { return Utility.RandomMinMax(40, 55); } }
public override int DexStart { get { return Utility.RandomMinMax(160, 180); } }
public override int IntStart { get { return Utility.RandomMinMax(110, 120); } }
public override bool RaiseDamage { get { return true; } }
public Sagittarri(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int v = reader.ReadInt();
}
}
public class Ursadane : DespiseCreature
{
[Constructable]
public Ursadane() : this(1)
{
}
[Constructable]
public Ursadane(int powerLevel) : base(AIType.AI_Melee, FightMode.Evil)
{
Name = "Ursadane";
Body = 212;
BaseSoundID = 0xA3;
Fame = GetFame;
Karma = GetKarmaGood;
Power = powerLevel;
SetWeaponAbility(WeaponAbility.CrushingBlow);
}
protected override BaseAI ForcedAI { get { return new DespiseMeleeAI(this); } }
public override PackInstinct PackInstinct { get { return PackInstinct.Bear; } }
public override bool RaiseDamage { get { return true; } }
public override int StrStart { get { return Utility.RandomMinMax(150, 175); } }
public override int DexStart { get { return Utility.RandomMinMax(90, 105); } }
public override int IntStart { get { return Utility.RandomMinMax(30, 40); } }
public override double WeaponAbilityChance { get { return 0.5; } }
public Ursadane(Serial serial) : base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)1);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int v = reader.ReadInt();
if (v == 0)
{
SetWeaponAbility(WeaponAbility.CrushingBlow);
}
}
}
public class DivineGuardian : DespiseCreature
{
[Constructable]
public DivineGuardian() : this(1)
{
}
[Constructable]
public DivineGuardian(int powerLevel) : base(AIType.AI_Melee, FightMode.Evil)
{
Name = "Divine Guardian";
Body = 123;
BaseSoundID = 0x2F7;
Fame = GetFame;
Karma = GetKarmaGood;
Power = powerLevel;
SetWeaponAbility(WeaponAbility.ConcussionBlow);
}
protected override BaseAI ForcedAI { get { return new DespiseMeleeAI(this); } }
public override bool RaiseDamage { get { return true; } }
public override int StrStart { get { return Utility.RandomMinMax(150, 175); } }
public override int DexStart { get { return Utility.RandomMinMax(120, 130); } }
public override int IntStart { get { return Utility.RandomMinMax(50, 60); } }
public override double WeaponAbilityChance { get { return 0.5; } }
public DivineGuardian(Serial serial) : base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)1);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int v = reader.ReadInt();
if (v == 0)
{
SetWeaponAbility(WeaponAbility.ConcussionBlow);
}
}
}
public class Dendrite : DespiseCreature
{
[Constructable]
public Dendrite() : this(1)
{
}
[Constructable]
public Dendrite(int powerLevel) : base(AIType.AI_Melee, FightMode.Evil)
{
Name = "Dendrite";
Body = 301;
Fame = GetFame;
Karma = GetKarmaGood;
Power = powerLevel;
SetWeaponAbility(WeaponAbility.DoubleStrike);
}
public override int GetIdleSound()
{
return 443;
}
public override int GetDeathSound()
{
return 31;
}
public override int GetAttackSound()
{
return 672;
}
protected override BaseAI ForcedAI { get { return new DespiseMeleeAI(this); } }
public override bool RaiseDamage { get { return true; } }
public override int StrStart { get { return Utility.RandomMinMax(100, 120); } }
public override int DexStart { get { return Utility.RandomMinMax(140, 155); } }
public override int IntStart { get { return Utility.RandomMinMax(30, 50); } }
public override double WeaponAbilityChance { get { return 0.5; } }
public Dendrite(Serial serial) : base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)1);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int v = reader.ReadInt();
if (v == 0)
{
SetWeaponAbility(WeaponAbility.DoubleStrike);
}
}
}
public class Fairy : DespiseCreature
{
private DateTime m_NextHeal;
private readonly double HealThreshold = 0.60;
public virtual int MinHeal { get { return Math.Max(10, Power * 3); } }
public virtual int MaxHeal { get { return Math.Max(25, Power * 5); } }
[Constructable]
public Fairy() : this(1)
{
}
[Constructable]
public Fairy(int powerLevel) : base(AIType.AI_Melee, FightMode.Evil)
{
Name = "Fairy";
Body = 0x108;
BaseSoundID = 0x467;
Fame = GetFame;
Karma = GetKarmaGood;
m_NextHeal = DateTime.UtcNow;
Power = powerLevel;
}
protected override BaseAI ForcedAI { get { return new DespiseMeleeAI(this); } }
public override int StrStart { get { return Utility.RandomMinMax(85, 100); } }
public override int DexStart { get { return Utility.RandomMinMax(110, 125); } }
public override int IntStart { get { return Utility.RandomMinMax(130, 150); } }
public override void OnThink()
{
base.OnThink();
if (m_NextHeal < DateTime.UtcNow && this.Map != null && this.Map != Map.Internal)
{
List<Mobile> eligables = new List<Mobile>();
IPooledEnumerable eable = this.Map.GetMobilesInRange(this.Location, 8);
foreach (Mobile m in eable)
{
if (m.Alive && m.Hits <= (int)((double)m.HitsMax * HealThreshold) && CanDoHeal(m))
eligables.Add(m);
}
if (eligables.Count > 0)
{
Mobile m = eligables[Utility.Random(eligables.Count)];
Direction = GetDirectionTo(m);
SpellHelper.Heal(Utility.RandomMinMax(MinHeal, MaxHeal), m, this);
m.FixedParticles(0x376A, 9, 32, 5030, EffectLayer.Waist);
m.PlaySound(0x202);
int nextHeal = Utility.RandomMinMax(20 - Power, 30 - Power);
m_NextHeal = DateTime.UtcNow + TimeSpan.FromSeconds(nextHeal);
return;
}
m_NextHeal = DateTime.UtcNow + TimeSpan.FromSeconds(5);
}
}
private bool CanDoHeal(Mobile toHeal)
{
if (toHeal is DespiseCreature && ((DespiseCreature)toHeal).Alignment == Alignment)
return true;
return toHeal is PlayerMobile && ((toHeal.Karma < 0 && Alignment == Alignment.Evil) || (toHeal.Karma > 0 && Alignment == Alignment.Good));
}
public Fairy(Serial serial) : base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int v = reader.ReadInt();
m_NextHeal = DateTime.UtcNow;
}
}
}

Some files were not shown because too many files have changed in this diff Show More