servuo/Scripts/Mobiles/Normal/Cursed.cs
pyro17 bebc100d6c
Ranger Equipment fix, Additem delete (#5012)
* Ranger Equipment fix, Additem delete
- add parameter with default value to AddItem
- On Conflict, still log conflict, but delete the conflicting Item by default

- Delete the base boots of Rangers befor adding the new boots

* Updated Mobile Scripts

- went through all scripts to update them to SetWearable
- reverted change to AddItem

* Update to SetWearable

- last item being set will be worn (if no override to OnEquip returns false
- delete the item on the layer that is the same as the new item (if existend)
- used ifs to cap item.Movable, therefor no need to call to Random if <= 0 or >= 1

* Update base InitOutFit

- replaced the Additem for Backpack with SetWearable, Movable is getting set this way too
- altered the other SetWearable calls, to allow the items to be moved / dropped (as they should normally)

* Null reference sanity check.

Co-authored-by: Voxpire <admin@vita-nex.com>
2022-06-16 04:44:54 +01:00

79 lines
No EOL
2.2 KiB
C#

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)
{
Title = "the Cursed";
Hue = Utility.RandomMinMax(0x8596, 0x8599);
Body = 0x190;
Name = NameList.RandomName("male");
BaseSoundID = 471;
SetWearable(new ShortPants(), Utility.RandomNeutralHue(), 1);
SetWearable(new Shirt(), Utility.RandomNeutralHue(), 1);
SetStr(91, 100);
SetDex(86, 95);
SetInt(61, 70);
SetHits(91, 120);
SetDamage(5, 13);
SetResistance(ResistanceType.Physical, 15, 25);
SetResistance(ResistanceType.Fire, 5, 10);
SetResistance(ResistanceType.Cold, 25, 35);
SetResistance(ResistanceType.Poison, 5, 10);
SetResistance(ResistanceType.Energy, 5, 10);
SetSkill(SkillName.Fencing, 46.0, 77.5);
SetSkill(SkillName.Macing, 35.0, 57.5);
SetSkill(SkillName.MagicResist, 53.5, 62.5);
SetSkill(SkillName.Swords, 55.0, 77.5);
SetSkill(SkillName.Tactics, 60.0, 82.5);
SetSkill(SkillName.Poisoning, 60.0, 82.5);
Fame = 1000;
Karma = -2000;
AddItem(Loot.RandomWeapon());
}
public Cursed(Serial serial)
: base(serial)
{
}
public override bool ClickTitle => false;
public override bool ShowFameTitle => false;
public override bool AlwaysMurderer => true;
public override int GetAttackSound()
{
return -1;
}
public override void GenerateLoot()
{
AddLoot(LootPack.Meager);
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}