Overwrite
Complete Overwrite of the Folder with the free shard. ServUO 57.3 has been added.
This commit is contained in:
61
Scripts/Mobiles/NPCs/Mannequin/BaseProperty.cs
Normal file
61
Scripts/Mobiles/NPCs/Mannequin/BaseProperty.cs
Normal file
@@ -0,0 +1,61 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public enum Catalog
|
||||
{
|
||||
None = 0,
|
||||
Attributes = 1,
|
||||
Resistances = 2,
|
||||
Combat1 = 3,
|
||||
Combat2 = 4,
|
||||
Casting = 5,
|
||||
Misc = 6,
|
||||
HitEffects = 7,
|
||||
SkillBonusGear = 8,
|
||||
}
|
||||
|
||||
public abstract class Property
|
||||
{
|
||||
public abstract int LabelNumber { get; }
|
||||
public abstract Catalog Catalog { get; }
|
||||
public virtual int Order { get; } = 1000;
|
||||
public virtual int Cap { get; set; } = 0;
|
||||
public virtual int Description { get; set; }
|
||||
|
||||
public virtual bool IsBoolen { get { return false; } }
|
||||
public virtual bool BoolenValue { get { return false; } }
|
||||
public virtual bool AlwaysVisible { get { return false; } }
|
||||
|
||||
public virtual bool IsSpriteGraph { get { return false; } }
|
||||
public virtual int SpriteH { get; set; }
|
||||
public virtual int SpriteW { get; set; }
|
||||
|
||||
public abstract bool Matches(Item item);
|
||||
public abstract bool Matches(List<Item> items);
|
||||
}
|
||||
|
||||
public abstract class ValuedProperty : Property
|
||||
{
|
||||
public virtual int Hue { get; }
|
||||
public double Value { get; set; }
|
||||
|
||||
public override bool Matches(List<Item> items) { return false; }
|
||||
}
|
||||
|
||||
public class LabelDefinition
|
||||
{
|
||||
public int TitleLabel { get; set; }
|
||||
public Catalog Catalog { get; set; }
|
||||
public int ColumnLeftCount { get; set; }
|
||||
|
||||
public LabelDefinition(int tl, Catalog ctlg, int cl = 0)
|
||||
{
|
||||
TitleLabel = tl;
|
||||
Catalog = ctlg;
|
||||
ColumnLeftCount = cl;
|
||||
}
|
||||
}
|
||||
}
|
||||
366
Scripts/Mobiles/NPCs/Mannequin/Gumps.cs
Normal file
366
Scripts/Mobiles/NPCs/Mannequin/Gumps.cs
Normal file
@@ -0,0 +1,366 @@
|
||||
using System;
|
||||
using Server.Mobiles;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Gumps
|
||||
{
|
||||
public class MannequinCompareGump : Gump
|
||||
{
|
||||
private readonly Item _SameItem;
|
||||
|
||||
public MannequinCompareGump(Mannequin mann, Item item)
|
||||
: base(100, 100)
|
||||
{
|
||||
_SameItem = mann.Items.Where(x => mann.LayerValidation(x, item)).FirstOrDefault();
|
||||
|
||||
if (_SameItem == null)
|
||||
return;
|
||||
|
||||
AddPage(0);
|
||||
|
||||
AddBackground(0, 0, 560, 720, 0x6DB);
|
||||
AddImageTiled(270, 5, 6, 710, 0x6DE);
|
||||
AddHtmlLocalized(5, 5, 270, 18, 1114513, "#1159291", 0x42FF, false, false); // <DIV ALIGN=CENTER>~1_TOKEN~</DIV>
|
||||
AddAlphaRegion(5, 5, 550, 710);
|
||||
|
||||
AddHtmlLocalized(0, 23, 270, 18, 1114513, string.Format("#{0}", _SameItem.LabelNumber), 0x7FFF, false, false); // <DIV ALIGN=CENTER>~1_TOKEN~</DIV>
|
||||
AddImageTiled(4, 80, 550, 5, 0x6DC);
|
||||
|
||||
List<ValuedProperty> EquipmentItem = Mannequin.FindItemProperty(_SameItem);
|
||||
|
||||
int si = 0;
|
||||
|
||||
for (int i = 0; i < EquipmentItem.Count; i++)
|
||||
{
|
||||
if (EquipmentItem[i].LabelNumber == 1159280) // Medable Armor - not appear
|
||||
continue;
|
||||
|
||||
if (EquipmentItem[i].IsSpriteGraph)
|
||||
{
|
||||
AddSpriteImage(5 + (35 * si), 41, 0x9D3B, EquipmentItem[i].SpriteW, EquipmentItem[i].SpriteH, 30, 30);
|
||||
AddTooltip(EquipmentItem[i].LabelNumber);
|
||||
|
||||
si++;
|
||||
}
|
||||
else
|
||||
{
|
||||
AddHtmlLocalized(45, 94 + (18 * i), 140, 18, EquipmentItem[i].LabelNumber, EquipmentItem[i].Hue, false, false);
|
||||
AddTooltip(EquipmentItem[i].Description);
|
||||
|
||||
if (!EquipmentItem[i].IsBoolen)
|
||||
AddHtml(190, 94 + (18 * i), 100, 18, Color(EquipmentItem[i].Value, EquipmentItem[i].Cap), false, false);
|
||||
}
|
||||
}
|
||||
|
||||
AddHtmlLocalized(270, 23, 270, 18, 1114513, string.Format("#{0}", item.LabelNumber), 0x7FFF, false, false); // <DIV ALIGN=CENTER>~1_TOKEN~</DIV>
|
||||
|
||||
List<ValuedProperty> SelectItem = Mannequin.FindItemProperty(item);
|
||||
|
||||
si = 0;
|
||||
|
||||
for (int i = 0; i < SelectItem.Count; i++)
|
||||
{
|
||||
if (SelectItem[i].LabelNumber == 1159280) // Medable Armor - not appear
|
||||
continue;
|
||||
|
||||
if (SelectItem[i].IsSpriteGraph)
|
||||
{
|
||||
AddSpriteImage(275 + (35 * si), 41, 0x9D3B, SelectItem[i].SpriteW, SelectItem[i].SpriteH, 30, 30);
|
||||
AddTooltip(SelectItem[i].LabelNumber);
|
||||
|
||||
si++;
|
||||
}
|
||||
else
|
||||
{
|
||||
AddHtmlLocalized(315, 94 + (18 * i), 140, 18, SelectItem[i].LabelNumber, SelectItem[i].Hue, false, false);
|
||||
AddTooltip(SelectItem[i].Description);
|
||||
|
||||
if (!SelectItem[i].IsBoolen)
|
||||
{
|
||||
double ev = 0;
|
||||
|
||||
if (EquipmentItem.Any(a => a.LabelNumber == SelectItem[i].LabelNumber))
|
||||
{
|
||||
ev = EquipmentItem.Find(a => a.LabelNumber == SelectItem[i].LabelNumber).Value;
|
||||
}
|
||||
|
||||
AddHtml(460, 94 + (18 * i), 100, 18, Color(SelectItem[i].Value, SelectItem[i].Cap, ev), false, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public string Color(double v1, double v2, double ev = 0)
|
||||
{
|
||||
string name;
|
||||
|
||||
double diffv = v1 - ev;
|
||||
|
||||
if (v2 == 0)
|
||||
{
|
||||
if (v1 == diffv || diffv == 0)
|
||||
{
|
||||
name = string.Format("<BASEFONT COLOR=#FFFFFF>{0}</BASEFONT>", v1);
|
||||
}
|
||||
else if (v1 > ev)
|
||||
{
|
||||
name = string.Format("<BASEFONT COLOR=#008000>{0} (+{1})</BASEFONT>", v1, diffv);
|
||||
}
|
||||
else
|
||||
{
|
||||
name = string.Format("<BASEFONT COLOR=#800000>{0} ({1})</BASEFONT>", v1, diffv);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (v1 == diffv || diffv == 0)
|
||||
{
|
||||
name = string.Format("<BASEFONT COLOR=#FFFFFF>{0}/{1}</BASEFONT>", v1, v2);
|
||||
}
|
||||
else if (v1 > ev)
|
||||
{
|
||||
name = string.Format("<BASEFONT COLOR=#008000>{0}/{1} (+{2})</BASEFONT>", v1, v2, diffv);
|
||||
}
|
||||
else
|
||||
{
|
||||
name = string.Format("<BASEFONT COLOR=#800000>{0}/{1} ({2})</BASEFONT>", v1, v2, diffv);
|
||||
}
|
||||
}
|
||||
|
||||
return name;
|
||||
}
|
||||
}
|
||||
|
||||
public class MannequinStatsGump : Gump
|
||||
{
|
||||
private readonly Mannequin _Mannequin;
|
||||
private readonly Item _SameItem;
|
||||
private readonly Item _Item;
|
||||
|
||||
public LabelDefinition[] Page1 = new LabelDefinition[]
|
||||
{
|
||||
new LabelDefinition(1049593, Catalog.Attributes, 5), // Attributes
|
||||
new LabelDefinition(1061645, Catalog.Resistances, 5), // Resistances
|
||||
new LabelDefinition(1077417, Catalog.Combat1, 8), // Combat
|
||||
};
|
||||
|
||||
public LabelDefinition[] Page2 = new LabelDefinition[]
|
||||
{
|
||||
new LabelDefinition(1077417, Catalog.Combat2, 3), // Combat
|
||||
new LabelDefinition(1076209, Catalog.Casting), // Casting
|
||||
new LabelDefinition(1044050, Catalog.Misc), // Miscellaneous
|
||||
new LabelDefinition(1114251, Catalog.HitEffects), // Hit Effects
|
||||
new LabelDefinition(1155065, Catalog.SkillBonusGear), // Skill Bonus Gear
|
||||
};
|
||||
|
||||
public class ItemPropDefinition
|
||||
{
|
||||
public List<ValuedProperty> SelectItem { get; set; }
|
||||
public List<ValuedProperty> EquipmentItem { get; set; }
|
||||
|
||||
public ItemPropDefinition(Item tl, Item ctlg)
|
||||
{
|
||||
SelectItem = Mannequin.GetProperty(tl);
|
||||
EquipmentItem = Mannequin.GetProperty(ctlg);
|
||||
}
|
||||
}
|
||||
|
||||
public MannequinStatsGump(Mannequin mann)
|
||||
: this(mann, null)
|
||||
{ }
|
||||
|
||||
public MannequinStatsGump(Mannequin mann, Item item)
|
||||
: this(mann, item, 0)
|
||||
{ }
|
||||
|
||||
public MannequinStatsGump(Mannequin mann, Item item, int page)
|
||||
: base(100, 100)
|
||||
{
|
||||
_Mannequin = mann;
|
||||
_Item = item;
|
||||
|
||||
AddPage(0);
|
||||
|
||||
AddBackground(0, 0, 604, 820, 0x6DB);
|
||||
AddAlphaRegion(5, 5, 594, 810);
|
||||
AddHtmlLocalized(10, 10, 584, 18, 1114513, "#1159279", 0x43F7, false, false); // <DIV ALIGN=CENTER>~1_TOKEN~</DIV>
|
||||
|
||||
List<ValuedProperty> lm = Mannequin.GetProperty(_Mannequin.Items);
|
||||
List<ItemPropDefinition> CompareItem = null;
|
||||
|
||||
if (_Item != null)
|
||||
{
|
||||
_SameItem = _Mannequin.Items.Where(x => _Mannequin.LayerValidation(x, item)).FirstOrDefault();
|
||||
|
||||
if (_SameItem != null)
|
||||
{
|
||||
CompareItem = new List<ItemPropDefinition>
|
||||
{
|
||||
new ItemPropDefinition(_Item, _SameItem)
|
||||
};
|
||||
|
||||
List<Item> list = _Mannequin.Items.Where(x => x != _SameItem).ToList();
|
||||
list.Add(_Item);
|
||||
|
||||
lm = Mannequin.GetProperty(list);
|
||||
}
|
||||
}
|
||||
|
||||
AddHtmlLocalized(479, 10, 75, 18, 1114514, "#1158215", 0x42FF, false, false); // <DIV ALIGN=RIGHT>~1_TOKEN~</DIV>
|
||||
|
||||
if (page > 0)
|
||||
AddButton(554, 10, 0x15E3, 0x15E7, 1000, GumpButtonType.Reply, 0); // Next Page Button
|
||||
else
|
||||
AddButton(554, 10, 0x15E1, 0x15E5, 1001, GumpButtonType.Reply, 0); // Previous Page Button
|
||||
|
||||
int y = 0;
|
||||
|
||||
LabelDefinition[] pages = page > 0 ? Page2 : Page1;
|
||||
|
||||
pages.ToList().ForEach(x =>
|
||||
{
|
||||
y += 28;
|
||||
|
||||
if (lm.Any(l => l.Catalog == x.Catalog))
|
||||
{
|
||||
AddHtmlLocalized(10, y, 150, 18, x.TitleLabel, 0x6A05, false, false);
|
||||
AddImageTiled(10, y + 18, 584, 5, 0x6DC);
|
||||
|
||||
y += 32;
|
||||
|
||||
List<ValuedProperty> cataloglist = lm.Where(i => i.Catalog == x.Catalog).OrderBy(ii => ii.Order).ToList();
|
||||
|
||||
int columncount = x.ColumnLeftCount == 0 ? (int)Math.Ceiling(cataloglist.Count / (decimal)2) : x.ColumnLeftCount;
|
||||
|
||||
for (int i = 0; i < cataloglist.Count; i++)
|
||||
{
|
||||
int label = cataloglist[i].LabelNumber;
|
||||
|
||||
if (i < columncount)
|
||||
{
|
||||
AddHtmlLocalized(45, y, 200, 18, label, 0x560A, false, false);
|
||||
AddSpriteImage(10, y - 5, 0x9D3B, cataloglist[i].SpriteW, cataloglist[i].SpriteH, 30, 30);
|
||||
AddTooltip(cataloglist[i].Description);
|
||||
|
||||
if (cataloglist[i].IsBoolen)
|
||||
{
|
||||
if (cataloglist[i].BoolenValue)
|
||||
{
|
||||
if (cataloglist[i].Value > 0)
|
||||
AddHtmlLocalized(195, y, 100, 18, 1046362, 0x42FF, false, false); // Yes
|
||||
else
|
||||
AddHtmlLocalized(195, y, 100, 18, 1046363, 0x42FF, false, false); // No
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
AddHtml(195, y, 100, 18, Color(cataloglist[i].Value, GetItemValue(CompareItem, label), cataloglist[i].Cap), false, false);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (i == columncount)
|
||||
y -= i * 30;
|
||||
|
||||
AddHtmlLocalized(342, y, 200, 18, label, 0x560A, false, false);
|
||||
AddSpriteImage(307, y - 5, 0x9D3B, cataloglist[i].SpriteW, cataloglist[i].SpriteH, 30, 30);
|
||||
AddTooltip(cataloglist[i].Description);
|
||||
|
||||
if (!cataloglist[i].IsBoolen)
|
||||
AddHtml(492, y, 100, 18, Color(cataloglist[i].Value, GetItemValue(CompareItem, label), cataloglist[i].Cap), false, false);
|
||||
}
|
||||
|
||||
y += 30;
|
||||
}
|
||||
|
||||
y += 3;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public double GetItemValue(List<ItemPropDefinition> list, int label)
|
||||
{
|
||||
if (list == null)
|
||||
return 0;
|
||||
|
||||
var l = list.FirstOrDefault();
|
||||
|
||||
double v1 = 0;
|
||||
double v2 = 0;
|
||||
|
||||
if (l.EquipmentItem.Any(r => r.LabelNumber == label))
|
||||
v1 = l.EquipmentItem.Where(r => r.LabelNumber == label).FirstOrDefault().Value;
|
||||
|
||||
if (l.SelectItem.Any(r => r.LabelNumber == label))
|
||||
v2 = l.SelectItem.Where(r => r.LabelNumber == label).FirstOrDefault().Value;
|
||||
|
||||
return v2 - v1;
|
||||
}
|
||||
|
||||
public string Color(double ev, double diff, int parmv)
|
||||
{
|
||||
string name;
|
||||
|
||||
if (_SameItem == null || diff == 0)
|
||||
{
|
||||
if (parmv == 0)
|
||||
{
|
||||
name = string.Format("<BASEFONT COLOR=#80BFFF>{0}</BASEFONT>", ev);
|
||||
}
|
||||
else
|
||||
{
|
||||
name = string.Format("<BASEFONT COLOR=#80BFFF>{0}/{1}</BASEFONT>", ev, parmv);
|
||||
}
|
||||
}
|
||||
else if (diff < 0)
|
||||
{
|
||||
if (parmv == 0)
|
||||
{
|
||||
name = string.Format("<BASEFONT COLOR=#800000>{0} (-{1})</BASEFONT>", ev, Math.Abs(diff));
|
||||
}
|
||||
else
|
||||
{
|
||||
name = string.Format("<BASEFONT COLOR=#800000>{0}/{1} (-{2})</BASEFONT>", ev, parmv, Math.Abs(diff));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (parmv == 0)
|
||||
{
|
||||
name = string.Format("<BASEFONT COLOR=#008000>{0} (+{1})</BASEFONT>", ev, diff);
|
||||
}
|
||||
else
|
||||
{
|
||||
name = string.Format("<BASEFONT COLOR=#008000>{0}/{1} (+{2})</BASEFONT>", ev, parmv, diff);
|
||||
}
|
||||
}
|
||||
|
||||
return name;
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState sender, RelayInfo info)
|
||||
{
|
||||
if (_Mannequin == null)
|
||||
return;
|
||||
|
||||
Mobile from = sender.Mobile;
|
||||
|
||||
switch (info.ButtonID)
|
||||
{
|
||||
case 0: { break; }
|
||||
case 1000:
|
||||
{
|
||||
from.SendGump(new MannequinStatsGump(_Mannequin, _Item, 0));
|
||||
break;
|
||||
}
|
||||
case 1001:
|
||||
{
|
||||
from.SendGump(new MannequinStatsGump(_Mannequin, _Item, 1));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
659
Scripts/Mobiles/NPCs/Mannequin/Mannequin.cs
Normal file
659
Scripts/Mobiles/NPCs/Mannequin/Mannequin.cs
Normal file
@@ -0,0 +1,659 @@
|
||||
using System;
|
||||
using Server.Items;
|
||||
using Server.Multis;
|
||||
using Server.Network;
|
||||
using Server.ContextMenus;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Server.Gumps;
|
||||
using Server.Targeting;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class Mannequin : BaseCreature
|
||||
{
|
||||
public override bool NoHouseRestrictions { get { return true; } }
|
||||
public override bool ClickTitle { get { return false; } }
|
||||
public override bool IsInvulnerable { get { return true; } }
|
||||
|
||||
public Mobile Owner { get; set; }
|
||||
public string Description { get; set; }
|
||||
|
||||
[Constructable]
|
||||
public Mannequin(Mobile owner)
|
||||
: base(AIType.AI_Use_Default, FightMode.None, 1, 1, 0.2, 0.2)
|
||||
{
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 0);
|
||||
SetDamageType(ResistanceType.Fire, 0);
|
||||
SetDamageType(ResistanceType.Cold, 0);
|
||||
SetDamageType(ResistanceType.Poison, 0);
|
||||
SetDamageType(ResistanceType.Energy, 0);
|
||||
|
||||
Hits = HitsMax;
|
||||
Blessed = true;
|
||||
Frozen = true;
|
||||
|
||||
Owner = owner;
|
||||
Body = 0x190;
|
||||
Race = Race.Human;
|
||||
Name = "a Mannequin";
|
||||
Hue = 1828;
|
||||
Direction = Direction.South;
|
||||
}
|
||||
|
||||
public bool IsOwner(Mobile m)
|
||||
{
|
||||
if (m.AccessLevel >= AccessLevel.GameMaster)
|
||||
return true;
|
||||
|
||||
return m == Owner;
|
||||
}
|
||||
|
||||
public override bool CanBeDamaged()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool CanBeRenamedBy(Mobile from)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool AllowEquipFrom(Mobile from)
|
||||
{
|
||||
if (IsOwner(from))
|
||||
return true;
|
||||
|
||||
return base.AllowEquipFrom(from);
|
||||
}
|
||||
|
||||
public override bool CheckNonlocalLift(Mobile from, Item item)
|
||||
{
|
||||
if (IsOwner(from))
|
||||
return true;
|
||||
|
||||
return base.CheckNonlocalLift(from, item);
|
||||
}
|
||||
|
||||
public override bool CheckNonlocalDrop(Mobile from, Item item, Item target)
|
||||
{
|
||||
if (IsOwner(from))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void GetProperties(ObjectPropertyList list)
|
||||
{
|
||||
base.GetProperties(list);
|
||||
|
||||
if (!string.IsNullOrEmpty(Description))
|
||||
{
|
||||
list.Add(1159410, Description); // Description: ~1_MESSAGE~
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnAosSingleClick(Mobile from)
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
DisplayPaperdollTo(from);
|
||||
}
|
||||
|
||||
public override void OnStatsQuery(Mobile from)
|
||||
{
|
||||
if (from.Map == Map && Utility.InUpdateRange(this, from) && from.CanSee(this))
|
||||
{
|
||||
from.Send(new MobileStatusCompact(false, this));
|
||||
|
||||
if (Map != null)
|
||||
{
|
||||
ProcessDelta();
|
||||
|
||||
Packet p = null;
|
||||
|
||||
IPooledEnumerable eable = Map.GetClientsInRange(Location);
|
||||
|
||||
foreach (NetState state in eable)
|
||||
{
|
||||
state.Mobile.ProcessDelta();
|
||||
|
||||
if (p == null)
|
||||
p = Packet.Acquire(new UpdateStatueAnimation(this, 1, 4, 0));
|
||||
|
||||
state.Send(p);
|
||||
}
|
||||
|
||||
Packet.Release(p);
|
||||
|
||||
eable.Free();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private List<Layer> SameLayers = new List<Layer>()
|
||||
{
|
||||
Layer.FirstValid,
|
||||
Layer.OneHanded,
|
||||
Layer.TwoHanded,
|
||||
};
|
||||
|
||||
public bool CheckSameLayer(Item i1, Item i2)
|
||||
{
|
||||
return i1 is BaseWeapon && i2 is BaseWeapon && SameLayers.Contains(i1.Layer) && SameLayers.Contains(i2.Layer);
|
||||
}
|
||||
|
||||
public bool LayerValidation(Item i1, Item i2)
|
||||
{
|
||||
return i1.Layer == i2.Layer || CheckSameLayer(i1, i2);
|
||||
}
|
||||
|
||||
public static List<ValuedProperty> GetProperty(Item item)
|
||||
{
|
||||
return FindItemProperty(item, true).Where(x => x.Catalog != Catalog.None).ToList();
|
||||
}
|
||||
|
||||
public static List<ValuedProperty> GetProperty(List<Item> items)
|
||||
{
|
||||
return FindItemsProperty(items).Where(x => x.Catalog != Catalog.None).ToList();
|
||||
}
|
||||
|
||||
public static List<ValuedProperty> FindItemsProperty(List<Item> item)
|
||||
{
|
||||
var ll = System.Reflection.Assembly.GetExecutingAssembly().GetTypes()
|
||||
.ToList().Where(r => r.FullName.Contains("MannequinProperty") && r.IsClass == true && r.IsAbstract == false).ToList();
|
||||
|
||||
List<ValuedProperty> cat = new List<ValuedProperty>();
|
||||
|
||||
ll.ForEach(x =>
|
||||
{
|
||||
var CI = Activator.CreateInstance(Type.GetType(x.FullName));
|
||||
|
||||
if (CI is ValuedProperty)
|
||||
{
|
||||
ValuedProperty p = CI as ValuedProperty;
|
||||
|
||||
if (p.Matches(item) || p.AlwaysVisible)
|
||||
cat.Add(p);
|
||||
}
|
||||
});
|
||||
|
||||
return cat;
|
||||
}
|
||||
|
||||
public static List<ValuedProperty> FindItemProperty(Item item, bool visible = false)
|
||||
{
|
||||
var ll = System.Reflection.Assembly.GetExecutingAssembly().GetTypes()
|
||||
.ToList().Where(r => r.FullName.Contains("MannequinProperty") && r.IsClass == true && r.IsAbstract == false).ToList();
|
||||
|
||||
List<ValuedProperty> cat = new List<ValuedProperty>();
|
||||
|
||||
ll.ForEach(x =>
|
||||
{
|
||||
var CI = Activator.CreateInstance(Type.GetType(x.FullName));
|
||||
|
||||
if (CI is ValuedProperty)
|
||||
{
|
||||
ValuedProperty p = CI as ValuedProperty;
|
||||
|
||||
if (p.Matches(item) || visible && p.AlwaysVisible)
|
||||
cat.Add(p);
|
||||
}
|
||||
});
|
||||
|
||||
return cat.OrderByDescending(x => x.Hue).ToList();
|
||||
}
|
||||
|
||||
public override void GetContextMenuEntries(Mobile from, List<ContextMenuEntry> list)
|
||||
{
|
||||
base.GetContextMenuEntries(from, list);
|
||||
|
||||
if (IsOwner(Owner))
|
||||
{
|
||||
if (from.Alive && from.InRange(this, 2))
|
||||
{
|
||||
list.Add(new ViewSuitsEntry(from, this));
|
||||
list.Add(new CompareWithItemInSlotEntry(from, this));
|
||||
list.Add(new ViewSuitsSelectItemEntry(from, this));
|
||||
list.Add(new AddDescriptionEntry(from, this));
|
||||
}
|
||||
|
||||
if (from.InRange(this, 4))
|
||||
list.Add(new CustomizeBodyEntry(from, this));
|
||||
|
||||
if (from.Alive && from.InRange(this, 2))
|
||||
{
|
||||
if (from.Race == Race || (from.Race == Race.Elf && Race == Race.Human || from.Race == Race.Human && Race == Race.Elf))
|
||||
{
|
||||
list.Add(new SwitchClothesEntry(from, this));
|
||||
}
|
||||
|
||||
list.Add(new RotateEntry(from, this));
|
||||
list.Add(new RedeedEntry(from, this));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void ForceRedeed(Mobile mobile, BaseHouse house = null)
|
||||
{
|
||||
if (!(mobile is Mannequin) && !(mobile is Steward))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (house != null)
|
||||
{
|
||||
List<Item> toAdd = new List<Item>(mobile.Items.Where(i => IsEquipped(i)));
|
||||
|
||||
if (mobile.Backpack != null)
|
||||
{
|
||||
toAdd.AddRange(mobile.Backpack.Items);
|
||||
}
|
||||
|
||||
foreach (var item in toAdd)
|
||||
{
|
||||
house.DropToMovingCrate(item);
|
||||
}
|
||||
|
||||
if (mobile is Mannequin)
|
||||
{
|
||||
house.DropToMovingCrate(new MannequinDeed());
|
||||
}
|
||||
else
|
||||
{
|
||||
house.DropToMovingCrate(new StewardDeed());
|
||||
}
|
||||
}
|
||||
|
||||
mobile.Delete();
|
||||
}
|
||||
|
||||
private class ViewSuitsEntry : ContextMenuEntry
|
||||
{
|
||||
private Mobile _From;
|
||||
private readonly Mannequin _Mannequin;
|
||||
|
||||
public ViewSuitsEntry(Mobile from, Mannequin m)
|
||||
: base(1159296, 3) // View Suit Stats
|
||||
{
|
||||
_From = from;
|
||||
_Mannequin = m;
|
||||
}
|
||||
|
||||
public override void OnClick()
|
||||
{
|
||||
_From.SendGump(new MannequinStatsGump(_Mannequin));
|
||||
}
|
||||
}
|
||||
|
||||
private class CompareWithItemInSlotEntry : ContextMenuEntry
|
||||
{
|
||||
private Mobile _From;
|
||||
private readonly Mannequin _Mannequin;
|
||||
|
||||
public CompareWithItemInSlotEntry(Mobile from, Mannequin m)
|
||||
: base(1159295, 3) // View Suit Stats With Selected Item
|
||||
{
|
||||
_From = from;
|
||||
_Mannequin = m;
|
||||
}
|
||||
|
||||
public override void OnClick()
|
||||
{
|
||||
_From.SendLocalizedMessage(1159294); // Target the item you wish to compare.
|
||||
_From.Target = new InternalTarget(_Mannequin);
|
||||
}
|
||||
|
||||
private class InternalTarget : Target
|
||||
{
|
||||
private readonly Mannequin _Mannequin;
|
||||
|
||||
public InternalTarget(Mannequin m)
|
||||
: base(-1, false, TargetFlags.None)
|
||||
{
|
||||
_Mannequin = m;
|
||||
}
|
||||
|
||||
protected override void OnTarget(Mobile from, object targeted)
|
||||
{
|
||||
from.SendGump(new MannequinCompareGump(_Mannequin, (Item)targeted));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private class ViewSuitsSelectItemEntry : ContextMenuEntry
|
||||
{
|
||||
private Mobile _From;
|
||||
private readonly Mannequin _Mannequin;
|
||||
|
||||
public ViewSuitsSelectItemEntry(Mobile from, Mannequin m)
|
||||
: base(1159297, 3) // View Suit Stats With Selected Item
|
||||
{
|
||||
_From = from;
|
||||
_Mannequin = m;
|
||||
}
|
||||
|
||||
public override void OnClick()
|
||||
{
|
||||
_From.SendLocalizedMessage(1159294); // Target the item you wish to compare.
|
||||
_From.Target = new InternalTarget(_Mannequin);
|
||||
}
|
||||
|
||||
private class InternalTarget : Target
|
||||
{
|
||||
private readonly Mannequin _Mannequin;
|
||||
|
||||
public InternalTarget(Mannequin m)
|
||||
: base(-1, false, TargetFlags.None)
|
||||
{
|
||||
_Mannequin = m;
|
||||
}
|
||||
|
||||
protected override void OnTarget(Mobile from, object targeted)
|
||||
{
|
||||
if (targeted is Item)
|
||||
from.SendGump(new MannequinStatsGump(_Mannequin, (Item)targeted));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private class AddDescriptionEntry : ContextMenuEntry
|
||||
{
|
||||
private Mobile _From;
|
||||
private readonly Mannequin _Mannequin;
|
||||
|
||||
public AddDescriptionEntry(Mobile from, Mannequin m)
|
||||
: base(1159411, 3) // Add Description
|
||||
{
|
||||
_From = from;
|
||||
_Mannequin = m;
|
||||
}
|
||||
|
||||
public override void OnClick()
|
||||
{
|
||||
_From.SendGump(new DescriptionGump(_Mannequin));
|
||||
}
|
||||
|
||||
private class DescriptionGump : Gump
|
||||
{
|
||||
private Mannequin _Mannequin;
|
||||
|
||||
public DescriptionGump(Mannequin mann)
|
||||
: base(0, 0)
|
||||
{
|
||||
_Mannequin = mann;
|
||||
|
||||
AddBackground(50, 50, 400, 300, 0xA28);
|
||||
|
||||
AddPage(0);
|
||||
|
||||
AddHtmlLocalized(50, 70, 400, 20, 1159409, 0x0, false, false); // <CENTER>Mannequin</CENTER>
|
||||
AddHtmlLocalized(75, 95, 350, 145, 1159408, 0x0, true, true); // Enter the description to add to the mannequin. Leave the text area blank to remove any existing text.
|
||||
AddButton(125, 300, 0x81A, 0x81B, 1, GumpButtonType.Reply, 0);
|
||||
AddButton(320, 300, 0x819, 0x818, 0, GumpButtonType.Reply, 0);
|
||||
AddImageTiled(75, 245, 350, 40, 0xDB0);
|
||||
AddImageTiled(76, 245, 350, 2, 0x23C5);
|
||||
AddImageTiled(75, 245, 2, 40, 0x23C3);
|
||||
AddImageTiled(75, 285, 350, 2, 0x23C5);
|
||||
AddImageTiled(425, 245, 2, 42, 0x23C3);
|
||||
AddTextEntry(78, 246, 343, 37, 0x4FF, 0, "", 44);
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState sender, RelayInfo info)
|
||||
{
|
||||
if (_Mannequin.Deleted)
|
||||
return;
|
||||
|
||||
if (info.ButtonID == 1)
|
||||
{
|
||||
TextRelay text = info.GetTextEntry(0);
|
||||
string s = text.Text;
|
||||
|
||||
if (s.Length > 44)
|
||||
s = s.Substring(0, 44);
|
||||
|
||||
_Mannequin.Description = s;
|
||||
_Mannequin.InvalidateProperties();
|
||||
|
||||
sender.Mobile.SendLocalizedMessage(1159412); // Updated
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private class CustomizeBodyEntry : ContextMenuEntry
|
||||
{
|
||||
private Mobile _From;
|
||||
private readonly Mobile _Mannequin;
|
||||
|
||||
public CustomizeBodyEntry(Mobile from, Mobile m)
|
||||
: base(1151585, 4)
|
||||
{
|
||||
_From = from;
|
||||
_Mannequin = m;
|
||||
}
|
||||
|
||||
public override void OnClick()
|
||||
{
|
||||
_From.SendGump(new MannequinGump(_From, _Mannequin));
|
||||
}
|
||||
}
|
||||
|
||||
private class SwitchClothesEntry : ContextMenuEntry
|
||||
{
|
||||
private readonly Mobile _From;
|
||||
private Mannequin _Mannequin;
|
||||
|
||||
public SwitchClothesEntry(Mobile from, Mannequin m)
|
||||
: base(1151606, 2)
|
||||
{
|
||||
_From = from;
|
||||
_Mannequin = m;
|
||||
}
|
||||
|
||||
public override void OnClick()
|
||||
{
|
||||
_Mannequin.SwitchClothes(_From, _Mannequin);
|
||||
}
|
||||
}
|
||||
|
||||
public static bool IsEquipped(Item item)
|
||||
{
|
||||
return item != null && item.Parent is Mobile && ((Mobile)item.Parent).FindItemOnLayer(item.Layer) == item &&
|
||||
item.Layer != Layer.Mount && item.Layer != Layer.Bank &&
|
||||
item.Layer != Layer.Invalid && item.Layer != Layer.Backpack && !(item is Backpack);
|
||||
}
|
||||
|
||||
public void SwitchClothes(Mobile from, Mobile m)
|
||||
{
|
||||
List<Item> MobileItems = from.Items.Where(x => IsEquipped(x)).ToList();
|
||||
List<Item> MannequinItems = m.Items.Where(x => IsEquipped(x)).ToList();
|
||||
|
||||
MannequinItems.ForEach(x => m.RemoveItem(x));
|
||||
MobileItems.ForEach(x => from.RemoveItem(x));
|
||||
|
||||
List<Item> ExceptItems = new List<Item>();
|
||||
|
||||
MannequinItems.ForEach(x =>
|
||||
{
|
||||
if (x.CanEquip(from))
|
||||
{
|
||||
from.EquipItem(x);
|
||||
}
|
||||
else
|
||||
{
|
||||
ExceptItems.Add(x);
|
||||
}
|
||||
});
|
||||
|
||||
MobileItems.ForEach(x =>
|
||||
{
|
||||
if (x.CanEquip(m))
|
||||
{
|
||||
m.EquipItem(x);
|
||||
}
|
||||
else
|
||||
{
|
||||
ExceptItems.Add(x);
|
||||
}
|
||||
});
|
||||
|
||||
if (ExceptItems.Count > 0)
|
||||
{
|
||||
ExceptItems.ForEach(x => from.AddToBackpack(x));
|
||||
from.SendLocalizedMessage(1151641, ExceptItems.Count.ToString(), 0x22); // ~1_COUNT~ items could not be swapped between you and the mannequin. These items are now in your backpack, or on the floor at your feet if your backpack is too full to hold them.
|
||||
}
|
||||
|
||||
from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1151607); // You quickly swap clothes with the mannequin.
|
||||
}
|
||||
|
||||
private class RotateEntry : ContextMenuEntry
|
||||
{
|
||||
private Mobile _From;
|
||||
private Mobile _Mannequin;
|
||||
|
||||
public RotateEntry(Mobile from, Mobile m)
|
||||
: base(1151586, 2)
|
||||
{
|
||||
_From = from;
|
||||
_Mannequin = m;
|
||||
}
|
||||
|
||||
public override void OnClick()
|
||||
{
|
||||
int direction = (int)_Mannequin.Direction;
|
||||
direction++;
|
||||
|
||||
if (direction > 0x7)
|
||||
direction = 0x0;
|
||||
|
||||
_Mannequin.Direction = (Direction)direction;
|
||||
|
||||
_From.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1151587); // You rotate the mannequin a little bit.
|
||||
}
|
||||
}
|
||||
|
||||
private class RedeedEntry : ContextMenuEntry
|
||||
{
|
||||
private Mobile _From;
|
||||
private Mobile _Mannequin;
|
||||
|
||||
public RedeedEntry(Mobile from, Mobile m)
|
||||
: base(1151601, 2)
|
||||
{
|
||||
_From = from;
|
||||
_Mannequin = m;
|
||||
}
|
||||
|
||||
public override void OnClick()
|
||||
{
|
||||
List<Item> mannequinItems = _Mannequin.Items.Where(x => IsEquipped(x)).ToList();
|
||||
mannequinItems.ForEach(x => _From.AddToBackpack(x));
|
||||
|
||||
_Mannequin.Delete();
|
||||
|
||||
_From.AddToBackpack(new MannequinDeed());
|
||||
}
|
||||
}
|
||||
|
||||
public Mannequin(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write((int)1); // version
|
||||
|
||||
writer.Write(Description);
|
||||
writer.Write(Owner);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch (version)
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
Description = reader.ReadString();
|
||||
|
||||
goto case 0;
|
||||
}
|
||||
case 0:
|
||||
{
|
||||
Owner = reader.ReadMobile();
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
[Flipable(0x14F0, 0x14EF)]
|
||||
public class MannequinDeed : Item
|
||||
{
|
||||
public override int LabelNumber { get { return 1151602; } } // Mannequin Deed
|
||||
|
||||
[Constructable]
|
||||
public MannequinDeed()
|
||||
: base(0x14F0)
|
||||
{
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
|
||||
public MannequinDeed(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (IsChildOf(from.Backpack))
|
||||
{
|
||||
BaseHouse house = BaseHouse.FindHouseAt(from);
|
||||
|
||||
if (house != null)
|
||||
{
|
||||
if (house.Owner == from || house.IsCoOwner(from))
|
||||
{
|
||||
from.SendLocalizedMessage(1151657); // Where do you wish to place this?
|
||||
from.Target = new PlaceTarget(this);
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(502096); // You must own the house to do this.
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(502092); // You must be in your house to do 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,223 @@
|
||||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Server.Mobiles.MannequinProperty
|
||||
{
|
||||
public abstract class AbsorptionAttr : ValuedProperty
|
||||
{
|
||||
public abstract SAAbsorptionAttribute Attribute { get; }
|
||||
|
||||
public double GetPropertyValue(Item item)
|
||||
{
|
||||
if (item is BaseArmor)
|
||||
{
|
||||
return ((BaseArmor)item).AbsorptionAttributes[Attribute];
|
||||
}
|
||||
|
||||
if (item is BaseJewel)
|
||||
{
|
||||
return ((BaseJewel)item).AbsorptionAttributes[Attribute];
|
||||
}
|
||||
|
||||
|
||||
if (item is BaseWeapon)
|
||||
{
|
||||
return ((BaseWeapon)item).AbsorptionAttributes[Attribute];
|
||||
}
|
||||
|
||||
if (item is BaseClothing)
|
||||
{
|
||||
return ((BaseClothing)item).SAAbsorptionAttributes[Attribute];
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public override bool Matches(Item item)
|
||||
{
|
||||
Value = GetPropertyValue(item);
|
||||
|
||||
if (Value != 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool Matches(List<Item> items)
|
||||
{
|
||||
double total = 0;
|
||||
|
||||
items.ForEach(x => total += GetPropertyValue(x));
|
||||
|
||||
Value = total;
|
||||
|
||||
if (Value != 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public class DamageEaterProperty : AbsorptionAttr
|
||||
{
|
||||
public override Catalog Catalog { get { return Catalog.Resistances; } }
|
||||
public override int Order { get { return 6; } }
|
||||
public override bool AlwaysVisible { get { return true; } }
|
||||
public override int LabelNumber { get { return 1154667; } } // Damage Eater
|
||||
public override int Description { get { return 1152390; } } // This property converts a small portion of damage dealt to a player back as health. The damage inflicted must be the same type of damage as the eater for the property to function. Similar eater properties stack with other but are capped at 30%. The "damage all" type of eater is capped at 18%. The property stores up to 20 healing charges and converts charges every three second from the last time damage was received. The "damage all" type of damage eater does not stack with specific eaters. This property is generally only found on armor and shields.
|
||||
public override SAAbsorptionAttribute Attribute { get { return SAAbsorptionAttribute.EaterDamage; } }
|
||||
public override int Cap { get { return 30; } }
|
||||
public override int Hue { get { return 0x42FF; } }
|
||||
public override int SpriteW { get { return 270; } }
|
||||
public override int SpriteH { get { return 60; } }
|
||||
}
|
||||
|
||||
public class KineticEaterProperty : AbsorptionAttr
|
||||
{
|
||||
public override Catalog Catalog { get { return Catalog.Resistances; } }
|
||||
public override int Order { get { return 7; } }
|
||||
public override bool AlwaysVisible { get { return true; } }
|
||||
public override int LabelNumber { get { return 1154666; } } // Kinetic Eater
|
||||
public override int Description { get { return 1152390; } } // This property converts a small portion of damage dealt to a player back as health. The damage inflicted must be the same type of damage as the eater for the property to function. Similar eater properties stack with other but are capped at 30%. The "damage all" type of eater is capped at 18%. The property stores up to 20 healing charges and converts charges every three second from the last time damage was received. The "damage all" type of damage eater does not stack with specific eaters. This property is generally only found on armor and shields.
|
||||
public override SAAbsorptionAttribute Attribute { get { return SAAbsorptionAttribute.EaterKinetic; } }
|
||||
public override int Cap { get { return 30; } }
|
||||
public override int Hue { get { return 0x42FF; } }
|
||||
public override int SpriteW { get { return 0; } }
|
||||
public override int SpriteH { get { return 90; } }
|
||||
}
|
||||
|
||||
public class FireEaterProperty : AbsorptionAttr
|
||||
{
|
||||
public override Catalog Catalog { get { return Catalog.Resistances; } }
|
||||
public override int Order { get { return 8; } }
|
||||
public override bool AlwaysVisible { get { return true; } }
|
||||
public override int LabelNumber { get { return 1154662; } } // Fire Eater
|
||||
public override int Description { get { return 1152390; } } // This property converts a small portion of damage dealt to a player back as health. The damage inflicted must be the same type of damage as the eater for the property to function. Similar eater properties stack with other but are capped at 30%. The "damage all" type of eater is capped at 18%. The property stores up to 20 healing charges and converts charges every three second from the last time damage was received. The "damage all" type of damage eater does not stack with specific eaters. This property is generally only found on armor and shields.
|
||||
public override SAAbsorptionAttribute Attribute { get { return SAAbsorptionAttribute.EaterFire; } }
|
||||
public override int Cap { get { return 30; } }
|
||||
public override int Hue { get { return 0x42FF; } }
|
||||
public override int SpriteW { get { return 30; } }
|
||||
public override int SpriteH { get { return 90; } }
|
||||
}
|
||||
|
||||
public class ColdEaterProperty : AbsorptionAttr
|
||||
{
|
||||
public override Catalog Catalog { get { return Catalog.Resistances; } }
|
||||
public override int Order { get { return 9; } }
|
||||
public override bool AlwaysVisible { get { return true; } }
|
||||
public override int LabelNumber { get { return 1154663; } } // Cold Eater
|
||||
public override int Description { get { return 1152390; } } // This property converts a small portion of damage dealt to a player back as health. The damage inflicted must be the same type of damage as the eater for the property to function. Similar eater properties stack with other but are capped at 30%. The "damage all" type of eater is capped at 18%. The property stores up to 20 healing charges and converts charges every three second from the last time damage was received. The "damage all" type of damage eater does not stack with specific eaters. This property is generally only found on armor and shields.
|
||||
public override SAAbsorptionAttribute Attribute { get { return SAAbsorptionAttribute.EaterCold; } }
|
||||
public override int Cap { get { return 30; } }
|
||||
public override int Hue { get { return 0x42FF; } }
|
||||
public override int SpriteW { get { return 60; } }
|
||||
public override int SpriteH { get { return 90; } }
|
||||
}
|
||||
|
||||
public class PoisonEaterProperty : AbsorptionAttr
|
||||
{
|
||||
public override Catalog Catalog { get { return Catalog.Resistances; } }
|
||||
public override int Order { get { return 10; } }
|
||||
public override bool AlwaysVisible { get { return true; } }
|
||||
public override int LabelNumber { get { return 1154664; } } // Poison Eater
|
||||
public override int Description { get { return 1152390; } } // This property converts a small portion of damage dealt to a player back as health. The damage inflicted must be the same type of damage as the eater for the property to function. Similar eater properties stack with other but are capped at 30%. The "damage all" type of eater is capped at 18%. The property stores up to 20 healing charges and converts charges every three second from the last time damage was received. The "damage all" type of damage eater does not stack with specific eaters. This property is generally only found on armor and shields.
|
||||
public override SAAbsorptionAttribute Attribute { get { return SAAbsorptionAttribute.EaterPoison; } }
|
||||
public override int Cap { get { return 30; } }
|
||||
public override int Hue { get { return 0x42FF; } }
|
||||
public override int SpriteW { get { return 90; } }
|
||||
public override int SpriteH { get { return 90; } }
|
||||
}
|
||||
|
||||
public class EnergyEaterProperty : AbsorptionAttr
|
||||
{
|
||||
public override Catalog Catalog { get { return Catalog.Resistances; } }
|
||||
public override int Order { get { return 11; } }
|
||||
public override bool AlwaysVisible { get { return true; } }
|
||||
public override int LabelNumber { get { return 1154665; } } // Energy Eater
|
||||
public override int Description { get { return 1152390; } } // This property converts a small portion of damage dealt to a player back as health. The damage inflicted must be the same type of damage as the eater for the property to function. Similar eater properties stack with other but are capped at 30%. The "damage all" type of eater is capped at 18%. The property stores up to 20 healing charges and converts charges every three second from the last time damage was received. The "damage all" type of damage eater does not stack with specific eaters. This property is generally only found on armor and shields.
|
||||
public override SAAbsorptionAttribute Attribute { get { return SAAbsorptionAttribute.EaterEnergy; } }
|
||||
public override int Cap { get { return 30; } }
|
||||
public override int Hue { get { return 0x42FF; } }
|
||||
public override int SpriteW { get { return 120; } }
|
||||
public override int SpriteH { get { return 90; } }
|
||||
}
|
||||
|
||||
public class FireResonanceProperty : AbsorptionAttr
|
||||
{
|
||||
public override Catalog Catalog { get { return Catalog.Casting; } }
|
||||
public override int LabelNumber { get { return 1154655; } } // Fire Resonance
|
||||
public override int Description { get { return 1152391; } } // This property provides a chance to resist interruptions while casting spells if the damage received is the same damage type as the resonance. This property can only be found on two handed weapons and shields.
|
||||
public override SAAbsorptionAttribute Attribute { get { return SAAbsorptionAttribute.ResonanceFire; } }
|
||||
public override int Cap { get { return 40; } }
|
||||
public override int Hue { get { return 0x1FF; } }
|
||||
public override int SpriteW { get { return 180; } }
|
||||
public override int SpriteH { get { return 90; } }
|
||||
}
|
||||
|
||||
public class ColdResonanceProperty : AbsorptionAttr
|
||||
{
|
||||
public override Catalog Catalog { get { return Catalog.Casting; } }
|
||||
public override int LabelNumber { get { return 1154656; } } // Cold Resonance
|
||||
public override int Description { get { return 1152391; } } // This property provides a chance to resist interruptions while casting spells if the damage received is the same damage type as the resonance. This property can only be found on two handed weapons and shields.
|
||||
public override SAAbsorptionAttribute Attribute { get { return SAAbsorptionAttribute.ResonanceCold; } }
|
||||
public override int Cap { get { return 40; } }
|
||||
public override int Hue { get { return 0x1FF; } }
|
||||
public override int SpriteW { get { return 210; } }
|
||||
public override int SpriteH { get { return 90; } }
|
||||
}
|
||||
|
||||
public class PoisonResonanceProperty : AbsorptionAttr
|
||||
{
|
||||
public override Catalog Catalog { get { return Catalog.Casting; } }
|
||||
public override int LabelNumber { get { return 1154657; } } // Poison Resonance
|
||||
public override int Description { get { return 1152391; } } // This property provides a chance to resist interruptions while casting spells if the damage received is the same damage type as the resonance. This property can only be found on two handed weapons and shields.
|
||||
public override SAAbsorptionAttribute Attribute { get { return SAAbsorptionAttribute.ResonancePoison; } }
|
||||
public override int Cap { get { return 40; } }
|
||||
public override int Hue { get { return 0x1FF; } }
|
||||
public override int SpriteW { get { return 240; } }
|
||||
public override int SpriteH { get { return 90; } }
|
||||
}
|
||||
|
||||
public class EnergyResonanceProperty : AbsorptionAttr
|
||||
{
|
||||
public override Catalog Catalog { get { return Catalog.Casting; } }
|
||||
public override int LabelNumber { get { return 1154658; } } // Energy Resonance
|
||||
public override int Description { get { return 1152391; } } // This property provides a chance to resist interruptions while casting spells if the damage received is the same damage type as the resonance. This property can only be found on two handed weapons and shields.
|
||||
public override SAAbsorptionAttribute Attribute { get { return SAAbsorptionAttribute.ResonanceEnergy; } }
|
||||
public override int Cap { get { return 40; } }
|
||||
public override int Hue { get { return 0x1FF; } }
|
||||
public override int SpriteW { get { return 270; } }
|
||||
public override int SpriteH { get { return 90; } }
|
||||
}
|
||||
|
||||
public class KineticResonanceProperty : AbsorptionAttr
|
||||
{
|
||||
public override Catalog Catalog { get { return Catalog.Casting; } }
|
||||
public override int LabelNumber { get { return 1154659; } } // Kinetic Resonance
|
||||
public override int Description { get { return 1152391; } } // This property provides a chance to resist interruptions while casting spells if the damage received is the same damage type as the resonance. This property can only be found on two handed weapons and shields.
|
||||
public override SAAbsorptionAttribute Attribute { get { return SAAbsorptionAttribute.ResonanceKinetic; } }
|
||||
public override int Cap { get { return 40; } }
|
||||
public override int Hue { get { return 0x1FF; } }
|
||||
public override int SpriteW { get { return 150; } }
|
||||
public override int SpriteH { get { return 90; } }
|
||||
}
|
||||
|
||||
public class CastingFocusProperty : AbsorptionAttr
|
||||
{
|
||||
// Only Mobile View
|
||||
public override Catalog Catalog { get { return Catalog.Casting; } }
|
||||
public override int LabelNumber { get { return 1116535; } } // Casting Focus
|
||||
public override int Description { get { return 1152389; } } // This property provides a chance to resist any interruptions while casting spells. It has a cumulative cap of 12%. The inscription skill can also grant up to a 5% additional bonus which can exceed the item cap.
|
||||
public override SAAbsorptionAttribute Attribute { get { return SAAbsorptionAttribute.CastingFocus; } }
|
||||
public override int Cap { get { return 12; } }
|
||||
public override int Hue { get { return 0x1FF; } }
|
||||
public override int SpriteW { get { return 60; } }
|
||||
public override int SpriteH { get { return 210; } }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Server.Mobiles.MannequinProperty
|
||||
{
|
||||
public abstract class AosArmorAttr : ValuedProperty
|
||||
{
|
||||
public abstract AosArmorAttribute Attribute { get; }
|
||||
|
||||
public double GetPropertyValue(Item item)
|
||||
{
|
||||
if (item is BaseArmor)
|
||||
{
|
||||
return ((BaseArmor)item).ArmorAttributes[Attribute];
|
||||
}
|
||||
|
||||
if (item is BaseClothing)
|
||||
{
|
||||
return ((BaseClothing)item).ClothingAttributes[Attribute];
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public override bool Matches(Item item)
|
||||
{
|
||||
double total = GetPropertyValue(item);
|
||||
|
||||
if (!IsBoolen)
|
||||
Value = GetPropertyValue(item);
|
||||
|
||||
if (total != 0)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool Matches(List<Item> items)
|
||||
{
|
||||
double total = 0;
|
||||
|
||||
items.ForEach(x => total += GetPropertyValue(x));
|
||||
|
||||
if (!IsBoolen)
|
||||
Value = total;
|
||||
|
||||
if (total != 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public class ArmorSelfRepairProperty : AosArmorAttr
|
||||
{
|
||||
public override Catalog Catalog { get { return Catalog.None; } }
|
||||
public override int LabelNumber { get { return 1079709; } } // Self Repair
|
||||
public override bool IsSpriteGraph { get { return true; } }
|
||||
public override int SpriteW { get { return 0; } }
|
||||
public override int SpriteH { get { return 300; } }
|
||||
public override AosArmorAttribute Attribute { get { return AosArmorAttribute.SelfRepair; } }
|
||||
}
|
||||
|
||||
public class ArmorReactiveParalyzeProperty : AosArmorAttr
|
||||
{
|
||||
public override Catalog Catalog { get { return Catalog.Combat1; } }
|
||||
public override bool IsBoolen { get { return true; } }
|
||||
public override int LabelNumber { get { return 1154660; } } // Reactive Paralyze
|
||||
public override int Description { get { return 1152400; } } // This property provides a chance to cast a paralyze spell on an opponent. The paralyze effect is similar to the magery fifth circle spell paralyze. When the wielder effectively parries an attacker’s blow there is a chance that the attacker will be affected by the paralyze effect. This property can be found on two handed weapons and shields.
|
||||
public override AosArmorAttribute Attribute { get { return AosArmorAttribute.ReactiveParalyze; } }
|
||||
public override int Hue { get { return 0x5E5D; } }
|
||||
public override int SpriteW { get { return 270; } }
|
||||
public override int SpriteH { get { return 120; } }
|
||||
}
|
||||
|
||||
public class SoulChargeProperty : AosArmorAttr
|
||||
{
|
||||
public override Catalog Catalog { get { return Catalog.Casting; } }
|
||||
public override int LabelNumber { get { return 1116536; } } // Soul Charge
|
||||
public override int Description { get { return 1152382; } } // This property converts a percentage of the damage inflicted to a player into mana replenishment. This effect can only be triggered once every 40 seconds. This property is only found on shields.
|
||||
public override AosArmorAttribute Attribute { get { return AosArmorAttribute.SoulCharge; } }
|
||||
public override int Hue { get { return 0x1FF; } }
|
||||
public override int SpriteW { get { return 240; } }
|
||||
public override int SpriteH { get { return 60; } }
|
||||
}
|
||||
}
|
||||
436
Scripts/Mobiles/NPCs/Mannequin/Property/AosAttributeProperty.cs
Normal file
436
Scripts/Mobiles/NPCs/Mannequin/Property/AosAttributeProperty.cs
Normal file
@@ -0,0 +1,436 @@
|
||||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Server.Mobiles.MannequinProperty
|
||||
{
|
||||
public abstract class MagicalAttr : ValuedProperty
|
||||
{
|
||||
public abstract AosAttribute Attribute { get; }
|
||||
|
||||
public double GetPropertyValue(Item item)
|
||||
{
|
||||
if (item is BaseWeapon)
|
||||
{
|
||||
return ((BaseWeapon)item).Attributes[Attribute];
|
||||
}
|
||||
|
||||
if (item is BaseArmor)
|
||||
{
|
||||
return ((BaseArmor)item).Attributes[Attribute];
|
||||
}
|
||||
|
||||
if (item is BaseClothing)
|
||||
{
|
||||
return ((BaseClothing)item).Attributes[Attribute];
|
||||
}
|
||||
|
||||
if (item is BaseJewel)
|
||||
{
|
||||
return ((BaseJewel)item).Attributes[Attribute];
|
||||
}
|
||||
|
||||
if (item is BaseTalisman)
|
||||
{
|
||||
return ((BaseTalisman)item).Attributes[Attribute];
|
||||
}
|
||||
|
||||
if (item is BaseQuiver)
|
||||
{
|
||||
return ((BaseQuiver)item).Attributes[Attribute];
|
||||
}
|
||||
|
||||
if (item is Spellbook)
|
||||
{
|
||||
return ((Spellbook)item).Attributes[Attribute];
|
||||
}
|
||||
|
||||
if (item is FishingPole)
|
||||
{
|
||||
return ((FishingPole)item).Attributes[Attribute];
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public override bool Matches(Item item)
|
||||
{
|
||||
double total = GetPropertyValue(item);
|
||||
|
||||
if (!IsBoolen)
|
||||
Value = GetPropertyValue(item);
|
||||
|
||||
if (total != 0)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool Matches(List<Item> items)
|
||||
{
|
||||
double total = 0;
|
||||
|
||||
items.ForEach(x => total += GetPropertyValue(x));
|
||||
|
||||
if (!IsBoolen)
|
||||
Value = total;
|
||||
|
||||
if (total != 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Combat
|
||||
public class DamageIncreaseProperty : MagicalAttr
|
||||
{
|
||||
public override Catalog Catalog { get { return Catalog.Combat1; } }
|
||||
public override int Order { get { return 1; } }
|
||||
public override bool AlwaysVisible { get { return true; } }
|
||||
public override int LabelNumber { get { return 1079760; } } // Damage Increase
|
||||
public override int Description { get { return 1115234; } } // This property provides an increase to the damage you inflict on successful melee or ranged attacks. This property can be found on all armor, shields, accessories or weapons.
|
||||
public override AosAttribute Attribute { get { return AosAttribute.WeaponDamage; } }
|
||||
public override int Cap { get { return 100; } }
|
||||
public override int Hue { get { return 0x5E5D; } }
|
||||
public override int SpriteW { get { return 60; } }
|
||||
public override int SpriteH { get { return 0; } }
|
||||
}
|
||||
|
||||
public class DefenseChanceIncreaseProperty : MagicalAttr
|
||||
{
|
||||
public override Catalog Catalog { get { return Catalog.Combat1; } }
|
||||
public override int Order { get { return 2; } }
|
||||
public override bool AlwaysVisible { get { return true; } }
|
||||
public override int LabelNumber { get { return 1075620; } } // Defense Chance Increase
|
||||
public override int Description { get { return 1152403; } } // This property enhances your ability to defend yourself from melee or ranged attacks. It does not affect your chances to evade magical attacks. Defense chance increase works in addition to your chance to parry or block an attack by using the Parrying skill. You may bypass the 45% defense chance increase soft cap to offset any sort of defense chance increase debuff, however 45% is the cap for general combat calculations. This property can be found on nearly all equipment.
|
||||
public override AosAttribute Attribute { get { return AosAttribute.DefendChance; } }
|
||||
public override int Cap { get { return 45; } }
|
||||
public override int Hue { get { return 0x5E5D; } }
|
||||
public override int SpriteW { get { return 210; } }
|
||||
public override int SpriteH { get { return 30; } }
|
||||
}
|
||||
|
||||
public class HitChanceIncreaseProperty : MagicalAttr
|
||||
{
|
||||
public override Catalog Catalog { get { return Catalog.Combat1; } }
|
||||
public override int Order { get { return 3; } }
|
||||
public override bool AlwaysVisible { get { return true; } }
|
||||
public override int LabelNumber { get { return 1075616; } } // Hit Chance Increase
|
||||
public override int Description { get { return 1115232; } } // This property increases your chance of successfully hitting a target. This can be offset by your target's defense chance increase value. This property is generally only found on weapons, shields and accessories.
|
||||
public override AosAttribute Attribute { get { return AosAttribute.AttackChance; } }
|
||||
public override int Cap { get { return 45; } }
|
||||
public override int Hue { get { return 0x5E5D; } }
|
||||
public override int SpriteW { get { return 210; } }
|
||||
public override int SpriteH { get { return 0; } }
|
||||
}
|
||||
|
||||
public class SwingSpeedIncreaseProperty : MagicalAttr
|
||||
{
|
||||
public override Catalog Catalog { get { return Catalog.Combat1; } }
|
||||
public override int Order { get { return 4; } }
|
||||
public override bool AlwaysVisible { get { return true; } }
|
||||
public override int LabelNumber { get { return 1075629; } } // Swing Speed Increase
|
||||
public override int Description { get { return 1115233; } } // This property increases the rate at which a player attacks with their weapon. The attack speed of a weapon is calculated based on the weapon speed of the weapon, the player’s current stamina and the amount of swing speed increase a player possesses. Swing speed can never be lower than 1.25 seconds per attack. This property is most commonly found on weapons.
|
||||
public override AosAttribute Attribute { get { return AosAttribute.WeaponSpeed; } }
|
||||
public override int Cap { get { return 60; } }
|
||||
public override int Hue { get { return 0x5E5D; } }
|
||||
public override int SpriteW { get { return 150; } }
|
||||
public override int SpriteH { get { return 30; } }
|
||||
}
|
||||
|
||||
public class LowerManaCostProperty : MagicalAttr
|
||||
{
|
||||
public override Catalog Catalog { get { return Catalog.Combat1; } }
|
||||
public override int Order { get { return 5; } }
|
||||
public override bool AlwaysVisible { get { return true; } }
|
||||
public override int LabelNumber { get { return 1075621; } } // Lower Mana Cost
|
||||
public override int Description { get { return 1115240; } } // This property reduces the mana needed to cast all spells. The maximum lower mana cost that can be provided from equipment is capped at 40%. This property is most commonly found on armor and accessories.
|
||||
public override AosAttribute Attribute { get { return AosAttribute.LowerManaCost; } }
|
||||
public override int Cap { get { return 41; } }
|
||||
public override int Hue { get { return 0x5E5D; } }
|
||||
public override int SpriteW { get { return 60; } }
|
||||
public override int SpriteH { get { return 60; } }
|
||||
}
|
||||
|
||||
public class ReflectPhysicalDamageProperty : MagicalAttr
|
||||
{
|
||||
public override Catalog Catalog { get { return Catalog.Combat1; } }
|
||||
public override int Order { get { return 7; } }
|
||||
public override bool AlwaysVisible { get { return true; } }
|
||||
public override int LabelNumber { get { return 1075626; } } // Reflect Physical Damage
|
||||
public override int Description { get { return 1152399; } } // This property reflects physical damage back onto an attacker. This property is only triggered by physical damage; any other source of damage (fire, cold, poison, energy) will not trigger the effect. A percentage of the damage inflicted will be reflected back at the attacker when a player wearing reflect physical damage equipment is struck by any non-magical attack that inflicts physical damage. The player wearing the reflect physical damage equipment will still receive the initial and the attacker will still be able to negate a portion of reflected damage based on their physical resistance. This property is capped at a cumulative 250%. This property is most commonly found on armor and shields.
|
||||
public override AosAttribute Attribute { get { return AosAttribute.ReflectPhysical; } }
|
||||
public override int Cap { get { return 250; } }
|
||||
public override int Hue { get { return 0x5E5D; } }
|
||||
public override int SpriteW { get { return 150; } }
|
||||
public override int SpriteH { get { return 60; } }
|
||||
}
|
||||
|
||||
public class EnhancePotionsProperty : MagicalAttr
|
||||
{
|
||||
public override Catalog Catalog { get { return Catalog.Combat1; } }
|
||||
public override int Order { get { return 8; } }
|
||||
public override bool AlwaysVisible { get { return true; } }
|
||||
public override int LabelNumber { get { return 1075624; } } // Enhance Potions
|
||||
public override int Description { get { return 1152405; } } // This property increases the effectiveness of potions used. When a potion is used, its effectiveness will be increased by the percentage of your cumulative enhance potions properties. Healing potions will heal more points of damage, curing potions will have a better chance to cure poison, etc. There is a 50% enhance potions cap from items. If your character has the alchemy skill, the cap is raised 10% for every 33 skill points you have. At 99 Alchemy the cap is 80%. Enhance potions is commonly found on jewelry.
|
||||
public override AosAttribute Attribute { get { return AosAttribute.EnhancePotions; } }
|
||||
public override int Hue { get { return 0x5E5D; } }
|
||||
public override int Cap { get { return 50; } }
|
||||
public override int SpriteW { get { return 240; } }
|
||||
public override int SpriteH { get { return 30; } }
|
||||
}
|
||||
|
||||
public class LuckProperty : MagicalAttr
|
||||
{
|
||||
public override Catalog Catalog { get { return Catalog.Combat1; } }
|
||||
public override int Order { get { return 9; } }
|
||||
public override bool AlwaysVisible { get { return true; } }
|
||||
public override int LabelNumber { get { return 1061153; } } // Luck
|
||||
public override int Description { get { return 1152415; } } // This property affects the quantity and quality of items spawned on a mobs corpse when it is killed. A player’s luck score is cumulative from all sources and can be viewed on the character status menu. Luck provides a chance of receiving more pieces of loot, a chance for the loot to have more magical properties and a chance for the magical properties to be of greater intensity. It should be noted that luck has no direct effect on what specific items will spawn or what specific properties will spawn on the items. This property can be found on all armor, shields, accessories or weapons.
|
||||
public override AosAttribute Attribute { get { return AosAttribute.Luck; } }
|
||||
public override int Hue { get { return 0x5E5D; } }
|
||||
public override int SpriteW { get { return 270; } }
|
||||
public override int SpriteH { get { return 0; } }
|
||||
}
|
||||
|
||||
// Attr
|
||||
|
||||
public class StrengthBonusProperty : MagicalAttr
|
||||
{
|
||||
public override Catalog Catalog { get { return Catalog.Attributes; } }
|
||||
public override int Order { get { return 1; } }
|
||||
public override bool AlwaysVisible { get { return true; } }
|
||||
public override int LabelNumber { get { return 1079767; } } // Strength Bonus
|
||||
public override int Description { get { return 1152432; } } // This property grants the specified bonus to your strength stat. There is a hard cap of 150 on all stats (strength, dexterity and intelligence). This property can be found on all armor, shields, accessories or weapons.
|
||||
public override AosAttribute Attribute { get { return AosAttribute.BonusStr; } }
|
||||
public override int Hue { get { return 0x43FF; } }
|
||||
public override int SpriteW { get { return 120; } }
|
||||
public override int SpriteH { get { return 30; } }
|
||||
}
|
||||
|
||||
public class DexterityBonusProperty : MagicalAttr
|
||||
{
|
||||
public override Catalog Catalog { get { return Catalog.Attributes; } }
|
||||
public override int Order { get { return 2; } }
|
||||
public override bool AlwaysVisible { get { return true; } }
|
||||
public override int LabelNumber { get { return 1079732; } } // Dexterity Bonus
|
||||
public override int Description { get { return 1152434; } } // This property grants the specified bonus to your dexterity stat. There is a hard cap of 150 on all stats (strength, dexterity and intelligence). This property can be found on all armor, shields, accessories or weapons.
|
||||
public override AosAttribute Attribute { get { return AosAttribute.BonusDex; } }
|
||||
public override int Hue { get { return 0x43FF; } }
|
||||
public override int SpriteW { get { return 90; } }
|
||||
public override int SpriteH { get { return 0; } }
|
||||
}
|
||||
|
||||
public class IntelligenceBonusProperty : MagicalAttr
|
||||
{
|
||||
public override Catalog Catalog { get { return Catalog.Attributes; } }
|
||||
public override int Order { get { return 3; } }
|
||||
public override bool AlwaysVisible { get { return true; } }
|
||||
public override int LabelNumber { get { return 1079756; } } // Intelligence Bonus
|
||||
public override int Description { get { return 1152433; } } // This property grants the specified bonus to your intelligence stat. There is a hard cap of 150 on all stats (strength, dexterity and intelligence). This property can be found on all armor, shields, accessories or weapons.
|
||||
public override AosAttribute Attribute { get { return AosAttribute.BonusInt; } }
|
||||
public override int Hue { get { return 0x43FF; } }
|
||||
public override int SpriteW { get { return 240; } }
|
||||
public override int SpriteH { get { return 0; } }
|
||||
}
|
||||
|
||||
public class HitPointsIncreaseProperty : MagicalAttr
|
||||
{
|
||||
public override Catalog Catalog { get { return Catalog.Attributes; } }
|
||||
public override int Order { get { return 4; } }
|
||||
public override bool AlwaysVisible { get { return true; } }
|
||||
public override int LabelNumber { get { return 1079404; } } // Hit Points Increase
|
||||
public override int Description { get { return 1152421; } } // This property adds to the user’s maximum hit points. The hit points are not instantly gained when the item is equipped; they will have to be regenerated or healed to the maximum. The maximum possible hit points increase from any source is capped at 25. This property is most commonly found on armor.
|
||||
public override AosAttribute Attribute { get { return AosAttribute.BonusHits; } }
|
||||
public override int Hue { get { return 0x43FF; } }
|
||||
public override int Cap { get { return 25; } }
|
||||
public override int SpriteW { get { return 180; } }
|
||||
public override int SpriteH { get { return 0; } }
|
||||
}
|
||||
|
||||
public class StaminaIncreaseProperty : MagicalAttr
|
||||
{
|
||||
public override Catalog Catalog { get { return Catalog.Attributes; } }
|
||||
public override int Order { get { return 5; } }
|
||||
public override bool AlwaysVisible { get { return true; } }
|
||||
public override int LabelNumber { get { return 1079405; } } // Stamina Increase
|
||||
public override int Description { get { return 1152395; } } // This property adds to the user’s maximum stamina. The stamina is not instantly gained when the item is equipped; it will have to be regenerated normally to the maximum. This property is most commonly found on armor.
|
||||
public override AosAttribute Attribute { get { return AosAttribute.BonusStam; } }
|
||||
public override int Hue { get { return 0x43FF; } }
|
||||
public override int Cap { get { return 25; } }
|
||||
public override int SpriteW { get { return 90; } }
|
||||
public override int SpriteH { get { return 30; } }
|
||||
}
|
||||
|
||||
public class ManaIncreaseProperty : MagicalAttr
|
||||
{
|
||||
public override Catalog Catalog { get { return Catalog.Attributes; } }
|
||||
public override int Order { get { return 6; } }
|
||||
public override bool AlwaysVisible { get { return true; } }
|
||||
public override int LabelNumber { get { return 1079406; } } // Mana Increase
|
||||
public override int Description { get { return 1152431; } } // This property adds to the user’s maximum mana. The mana is not instantly gained when the item is equipped; it will have to be regenerated normally to the maximum. This property is most commonly found on armor.
|
||||
public override AosAttribute Attribute { get { return AosAttribute.BonusMana; } }
|
||||
public override int Hue { get { return 0x43FF; } }
|
||||
public override int Cap { get { return 25; } }
|
||||
public override int SpriteW { get { return 0; } }
|
||||
public override int SpriteH { get { return 30; } }
|
||||
}
|
||||
|
||||
public class HitPointRegenerationProperty : MagicalAttr
|
||||
{
|
||||
public override Catalog Catalog { get { return Catalog.Attributes; } }
|
||||
public override int Order { get { return 7; } }
|
||||
public override bool AlwaysVisible { get { return true; } }
|
||||
public override int LabelNumber { get { return 1075627; } } // Hit Point Regeneration
|
||||
public override int Description { get { return 1115241; } } // This property increases the rate of hit point recovery. The maximum hit point regeneration that can be provided from equipment is capped at 18. This property is most commonly found on armor.
|
||||
public override AosAttribute Attribute { get { return AosAttribute.RegenHits; } }
|
||||
public override int Cap { get { return 18; } }
|
||||
public override int Hue { get { return 0x43FF; } }
|
||||
public override int SpriteW { get { return 30; } }
|
||||
public override int SpriteH { get { return 60; } }
|
||||
}
|
||||
|
||||
public class StaminaRegerationProperty : MagicalAttr
|
||||
{
|
||||
public override Catalog Catalog { get { return Catalog.Attributes; } }
|
||||
public override int Order { get { return 8; } }
|
||||
public override bool AlwaysVisible { get { return true; } }
|
||||
public override int LabelNumber { get { return 1079411; } } // Stamina Regeneration
|
||||
public override int Description { get { return 1115242; } } // This property increases the rate of stamina recovery. The maximum stamina regeneration that can be provided from equipment is capped at 24. This property is most commonly found on armor.
|
||||
public override AosAttribute Attribute { get { return AosAttribute.RegenStam; } }
|
||||
public override int Cap { get { return 24; } }
|
||||
public override int Hue { get { return 0x43FF; } }
|
||||
public override int SpriteW { get { return 210; } }
|
||||
public override int SpriteH { get { return 60; } }
|
||||
}
|
||||
|
||||
public class ManaRegenerationProperty : MagicalAttr
|
||||
{
|
||||
public override Catalog Catalog { get { return Catalog.Attributes; } }
|
||||
public override int Order { get { return 9; } }
|
||||
public override bool AlwaysVisible { get { return true; } }
|
||||
public override int LabelNumber { get { return 1079410; } } // Mana Regeneration
|
||||
public override int Description { get { return 1115243; } } // This property increases the rate of mana recovery. Mana regeneration is subject to diminishing returns. The maximum mana regeneration that can be provided from any source is a capped at 30. This property is most commonly found on armor.
|
||||
public override AosAttribute Attribute { get { return AosAttribute.RegenMana; } }
|
||||
public override int Cap { get { return 30; } }
|
||||
public override int Hue { get { return 0x43FF; } }
|
||||
public override int SpriteW { get { return 120; } }
|
||||
public override int SpriteH { get { return 60; } }
|
||||
}
|
||||
|
||||
public class SpellDamageIncreaseProperty : MagicalAttr
|
||||
{
|
||||
public override Catalog Catalog { get { return Catalog.Casting; } }
|
||||
public override int Order { get { return 4; } }
|
||||
public override bool AlwaysVisible { get { return true; } }
|
||||
public override int LabelNumber { get { return 1075628; } } // Spell Damage Increase
|
||||
public override int Description { get { return 1152397; } } // This property increases the damage for most magical attacks that are casted. While the property is normally capped at 15% in PvP, the cap can be further increased to 30% for focused templates. Focus templates have no more than 30 modified skill points in more than one primary skill such as magery, necromancy, mysticism, ninjitsu, bushido, animal taming, musicianship, chivalry or spellweaving. Also no more than 30 modified skill points in the associated secondary skill such as evaluate intelligence, spirit speaking, focus, imbuing. There is no cap to spell damage increase in PvM. This property is most commonly found on accessories and spellbooks.
|
||||
public override AosAttribute Attribute { get { return AosAttribute.SpellDamage; } }
|
||||
public override int Hue { get { return 0x1FF; } }
|
||||
public override int SpriteW { get { return 180; } }
|
||||
public override int SpriteH { get { return 60; } }
|
||||
}
|
||||
|
||||
public class FasterCastRecoveryProperty : MagicalAttr
|
||||
{
|
||||
public override Catalog Catalog { get { return Catalog.Casting; } }
|
||||
public override int Order { get { return 2; } }
|
||||
public override bool AlwaysVisible { get { return true; } }
|
||||
public override int LabelNumber { get { return 1075618; } } // Faster Cast Recovery
|
||||
public override int Description { get { return 1152406; } } // This property reduces the recovery time after casting a spell. When a spell is cast it can take a short period of time before another can be started. This period of recovery can be reduced with faster cast recovery. Casting recovery affects all spell casting and the property is capped at a cumulative total of 6 cast recovery. This property is generally only found on accessories and spellbooks in values ranging from 1 to 3.
|
||||
public override AosAttribute Attribute { get { return AosAttribute.CastRecovery; } }
|
||||
public override int Hue { get { return 0x1FF; } }
|
||||
public override int Cap { get { return 6; } }
|
||||
public override int SpriteW { get { return 0; } }
|
||||
public override int SpriteH { get { return 60; } }
|
||||
}
|
||||
|
||||
public class FasterCastingProperty : MagicalAttr
|
||||
{
|
||||
public override Catalog Catalog { get { return Catalog.Casting; } }
|
||||
public override int Order { get { return 1; } }
|
||||
public override bool AlwaysVisible { get { return true; } }
|
||||
public override int LabelNumber { get { return 1075617; } } // Faster Casting
|
||||
public override int Description { get { return 1152407; } } // This property reduces the amount time it takes to cast a spell. This property is capped based on the source of the spell being cast. Mages, Mystics and Necromancers have a maximum faster casting of 2 while Chivalry, Ninjitsu, Bushido or Spellweaving can have a maximum Faster Casting of 4. If a character possesses Magery, Mysticism or Necromancy at 70.0 skill or greater then faster casting is capped at 2 for Chivalry. Casting time is shortened by 0.25 seconds for every point in faster casting. This property is generally only found on weapons, shields and accessories.
|
||||
public override AosAttribute Attribute { get { return AosAttribute.CastSpeed; } }
|
||||
public override int Hue { get { return 0x1FF; } }
|
||||
public override int Cap { get { return 4; } }
|
||||
public override int SpriteW { get { return 270; } }
|
||||
public override int SpriteH { get { return 30; } }
|
||||
}
|
||||
|
||||
public class LowerReagentCostProperty : MagicalAttr
|
||||
{
|
||||
public override Catalog Catalog { get { return Catalog.Casting; } }
|
||||
public override int Order { get { return 3; } }
|
||||
public override bool AlwaysVisible { get { return true; } }
|
||||
public override int LabelNumber { get { return 1075625; } } // Lower Reagent Cost
|
||||
public override int Description { get { return 1115235; } } // This property increases the chance to not consume reagents or tithing points when casting spells. If the cumulative amount of this property is equal or above 100% then there is no reagents or tithing points cost to casting spells. This property is most commonly found on armor and accessories.
|
||||
public override AosAttribute Attribute { get { return AosAttribute.LowerRegCost; } }
|
||||
public override int Cap { get { return 100; } }
|
||||
public override int Hue { get { return 0x1FF; } }
|
||||
public override int SpriteW { get { return 90; } }
|
||||
public override int SpriteH { get { return 60; } }
|
||||
}
|
||||
|
||||
public class SpellChannelingCostProperty : MagicalAttr
|
||||
{
|
||||
public override Catalog Catalog { get { return Catalog.Casting; } }
|
||||
public override bool IsBoolen { get { return true; } }
|
||||
public override int LabelNumber { get { return 1079766; } } // Spell Channeling
|
||||
public override int Description { get { return 1152398; } } // This property allows all spell casting to occur without the equipped item being unequipped. It is always accompanied by a faster casting penalty of -1 which does not count as an additional property. This faster casting penalty can be negated if the item also has a positive faster casting property as well. This property is only found on weapons and shields.
|
||||
public override AosAttribute Attribute { get { return AosAttribute.SpellChanneling; } }
|
||||
public override int Hue { get { return 0x1FF; } }
|
||||
public override int SpriteW { get { return 210; } }
|
||||
public override int SpriteH { get { return 120; } }
|
||||
}
|
||||
|
||||
public class NightSightProperty : MagicalAttr
|
||||
{
|
||||
public override Catalog Catalog { get { return Catalog.Misc; } }
|
||||
public override bool IsBoolen { get { return true; } }
|
||||
public override int LabelNumber { get { return 1075643; } } // Night Sight
|
||||
public override int Description { get { return 1152416; } } // This property allows the user to ignore the effects of darkness from either night or from being underground in a dungeon. This property can be found on all armor, shields, accessories or weapons.
|
||||
public override AosAttribute Attribute { get { return AosAttribute.NightSight; } }
|
||||
public override int Hue { get { return 0x43FF; } }
|
||||
public override int SpriteW { get { return 30; } }
|
||||
public override int SpriteH { get { return 150; } }
|
||||
}
|
||||
|
||||
public class BrittleProperty : MagicalAttr
|
||||
{
|
||||
public override Catalog Catalog { get { return Catalog.None; } }
|
||||
public override int LabelNumber { get { return 1116209; } } // Brittle
|
||||
public override bool IsSpriteGraph { get { return true; } }
|
||||
public override int SpriteW { get { return 90; } }
|
||||
public override int SpriteH { get { return 240; } }
|
||||
public override AosAttribute Attribute { get { return AosAttribute.Brittle; } }
|
||||
}
|
||||
|
||||
public class LowerAmmoCostProperty : MagicalAttr
|
||||
{
|
||||
public override Catalog Catalog { get { return Catalog.Misc; } }
|
||||
public override int LabelNumber { get { return 1159315; } } // Lower Ammo Cost
|
||||
public override int Description { get { return 1152459; } } // This property provides a reduction in the amount of arrows or bolts an archer uses. The reduction is based on a random chance that an arrow or bolt shot from a weapon will not be consumed.
|
||||
public override AosAttribute Attribute { get { return AosAttribute.LowerAmmoCost; } }
|
||||
public override int Hue { get { return 0x43FF; } }
|
||||
public override int SpriteW { get { return 150; } }
|
||||
public override int SpriteH { get { return 270; } }
|
||||
}
|
||||
|
||||
public class BalancedWeaponProperty : MagicalAttr
|
||||
{
|
||||
public override Catalog Catalog { get { return Catalog.Combat1; } }
|
||||
public override bool IsBoolen { get { return true; } }
|
||||
public override int LabelNumber { get { return 1072792; } } // Balanced
|
||||
public override int Description { get { return 1152384; } } // This property is only available on archery weapons. This property allows a player to use a two handed weapon as if it were a one handed weapon. You can perform any action that normally requires a free hand, such as drinking a potion or throwing a shuriken.
|
||||
public override AosAttribute Attribute { get { return AosAttribute.BalancedWeapon; } }
|
||||
public override int Hue { get { return 0x5E5D; } }
|
||||
public override int SpriteW { get { return 180; } }
|
||||
public override int SpriteH { get { return 120; } }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Server.Mobiles.MannequinProperty
|
||||
{
|
||||
public abstract class ExtendedWeaponAttr : ValuedProperty
|
||||
{
|
||||
public abstract ExtendedWeaponAttribute Attribute { get; }
|
||||
|
||||
public double GetPropertyValue(Item item)
|
||||
{
|
||||
return item is BaseWeapon ? ((BaseWeapon)item).ExtendedWeaponAttributes[Attribute] : 0;
|
||||
}
|
||||
|
||||
public override bool Matches(Item item)
|
||||
{
|
||||
double total = GetPropertyValue(item);
|
||||
|
||||
if (!IsBoolen)
|
||||
Value = total;
|
||||
|
||||
if (total != 0)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool Matches(List<Item> items)
|
||||
{
|
||||
double total = 0;
|
||||
|
||||
items.ForEach(x => total += GetPropertyValue(x));
|
||||
|
||||
if (!IsBoolen)
|
||||
Value = total;
|
||||
|
||||
if (total != 0)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public class BaneProperty : ExtendedWeaponAttr
|
||||
{
|
||||
public override Catalog Catalog { get { return Catalog.HitEffects; } }
|
||||
public override bool IsBoolen { get { return true; } }
|
||||
public override int LabelNumber { get { return 1154671; } } // Bane
|
||||
public override int Description { get { return 1154570; } } // This property provides a chance to inflict additional damage when the targets health is below 50%. As the target's health decreases the chance for the property to fire will increase along with the damage inflicted. The damage inflicted is physical damage that can be lessened by a targets physical resistance. Bane has the potential to damage the target for up to 30% of its maximum hit points however this damage cannot exceed 350 points of damage.
|
||||
public override ExtendedWeaponAttribute Attribute { get { return ExtendedWeaponAttribute.Bane; } }
|
||||
public override int Hue { get { return 0x43FF; } }
|
||||
public override int SpriteW { get { return 120; } }
|
||||
public override int SpriteH { get { return 210; } }
|
||||
}
|
||||
|
||||
public class AssassinHonedProperty : ExtendedWeaponAttr
|
||||
{
|
||||
public override Catalog Catalog { get { return Catalog.HitEffects; } }
|
||||
public override bool IsBoolen { get { return true; } }
|
||||
public override int LabelNumber { get { return 1152206; } } // Assassin Honed
|
||||
public override int Description { get { return 1152383; } } // This property provides additional bonus damage when the attacker is facing the same direction as the target. The bonus damage is based on the weapons original swing speed. Ranged weapons have a 50% chance to proc. The maximum bonus is 73% while minimum bonus 13%. This property can be found on most weapon types.
|
||||
public override ExtendedWeaponAttribute Attribute { get { return ExtendedWeaponAttribute.AssassinHoned; } }
|
||||
public override int Hue { get { return 0x43FF; } }
|
||||
public override int SpriteW { get { return 0; } }
|
||||
public override int SpriteH { get { return 330; } }
|
||||
}
|
||||
|
||||
public class FocusProperty : ExtendedWeaponAttr
|
||||
{
|
||||
public override Catalog Catalog { get { return Catalog.HitEffects; } }
|
||||
public override bool IsBoolen { get { return true; } }
|
||||
public override int LabelNumber { get { return 1150018; } } // Focus
|
||||
public override int Description { get { return 1152465; } } // This property provides increased weapon damage with each successful hit to the same target. The damage modified by this property cycles from a negative value to a positive value. The initial damage inflicted by this property is -40% of the items base damage; however the latter damage inflicted by this property is +20% of the items base damage. When the user switches to a new target the damage increase resets back to the negative value and the cycling begins again.
|
||||
public override ExtendedWeaponAttribute Attribute { get { return ExtendedWeaponAttribute.Focus; } }
|
||||
public override int Hue { get { return 0x43FF; } }
|
||||
public override int SpriteW { get { return 270; } }
|
||||
public override int SpriteH { get { return 240; } }
|
||||
}
|
||||
|
||||
public class BoneBreakerProperty : ExtendedWeaponAttr
|
||||
{
|
||||
public override Catalog Catalog { get { return Catalog.HitEffects; } }
|
||||
public override bool IsBoolen { get { return true; } }
|
||||
public override int LabelNumber { get { return 1157320; } } // Bone Breaker
|
||||
public override int Description { get { return 1157319; } } // This property provides a chance to cause a loss of stamina over time and prevent the use of refreshment potions for a period of time to the target. This property can be found on select artifacts.
|
||||
public override ExtendedWeaponAttribute Attribute { get { return ExtendedWeaponAttribute.BoneBreaker; } }
|
||||
public override int Hue { get { return 0x43FF; } }
|
||||
public override int SpriteW { get { return 90; } }
|
||||
public override int SpriteH { get { return 300; } }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles.MannequinProperty
|
||||
{
|
||||
public abstract class NegativeAttr : ValuedProperty
|
||||
{
|
||||
public abstract NegativeAttribute Attribute { get; }
|
||||
|
||||
public double GetPropertyValue(Item item)
|
||||
{
|
||||
return item is BaseWeapon ? ((BaseWeapon)item).NegativeAttributes[Attribute] : 0;
|
||||
}
|
||||
|
||||
public override bool Matches(Item item)
|
||||
{
|
||||
Value = GetPropertyValue(item);
|
||||
|
||||
if (Value != 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public class PrizedProperty : NegativeAttr
|
||||
{
|
||||
public override Catalog Catalog { get { return Catalog.None; } }
|
||||
public override int LabelNumber { get { return 1154910; } } // Prized
|
||||
public override bool IsSpriteGraph { get { return true; } }
|
||||
public override int SpriteW { get { return 30; } }
|
||||
public override int SpriteH { get { return 210; } }
|
||||
public override NegativeAttribute Attribute { get { return NegativeAttribute.Prized; } }
|
||||
}
|
||||
|
||||
public class AntiqueProperty : NegativeAttr
|
||||
{
|
||||
public override Catalog Catalog { get { return Catalog.None; } }
|
||||
public override int LabelNumber { get { return 1152714; } } // Antique
|
||||
public override bool IsSpriteGraph { get { return true; } }
|
||||
public override int SpriteW { get { return 60; } }
|
||||
public override int SpriteH { get { return 240; } }
|
||||
public override NegativeAttribute Attribute { get { return NegativeAttribute.Antique; } }
|
||||
}
|
||||
|
||||
public class NegativeBrittleProperty : NegativeAttr
|
||||
{
|
||||
public override Catalog Catalog { get { return Catalog.None; } }
|
||||
public override int LabelNumber { get { return 1116209; } } // Brittle
|
||||
public override bool IsSpriteGraph { get { return true; } }
|
||||
public override int SpriteW { get { return 90; } }
|
||||
public override int SpriteH { get { return 240; } }
|
||||
public override NegativeAttribute Attribute { get { return NegativeAttribute.Brittle; } }
|
||||
}
|
||||
|
||||
public class NotCannotBeRepairedProperty : NegativeAttr
|
||||
{
|
||||
public override Catalog Catalog { get { return Catalog.None; } }
|
||||
public override int LabelNumber { get { return 1151782; } } // cannot be repaired
|
||||
public override bool IsSpriteGraph { get { return true; } }
|
||||
public override int SpriteW { get { return 120; } }
|
||||
public override int SpriteH { get { return 240; } }
|
||||
public override NegativeAttribute Attribute { get { return NegativeAttribute.NoRepair; } }
|
||||
}
|
||||
}
|
||||
310
Scripts/Mobiles/NPCs/Mannequin/Property/OtherProperty.cs
Normal file
310
Scripts/Mobiles/NPCs/Mannequin/Property/OtherProperty.cs
Normal file
@@ -0,0 +1,310 @@
|
||||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Server.Mobiles.MannequinProperty
|
||||
{
|
||||
public class DurabilityProperty : ValuedProperty
|
||||
{
|
||||
public override Catalog Catalog { get { return Catalog.None; } }
|
||||
public override int LabelNumber { get { return 1017323; } } // Durability
|
||||
public override int Description { get { return 1152404; } } // This property indicates how in need of repairs an item is or how close an item is to breaking. It is comprised of two parts: the current durability and the maximum durability. Both of which are values in the range of 0 - 255. If both of these values are allowed to reach 0 on an item, the item is destroyed. This property can be found on all armor, shields, accessories or weapons.
|
||||
public override int Hue { get { return 0x1F0; } }
|
||||
|
||||
public override bool Matches(Item item)
|
||||
{
|
||||
int prop, prop2;
|
||||
|
||||
if (item is BaseArmor)
|
||||
{
|
||||
if ((prop = ((BaseArmor)item).HitPoints) >= 0 && (prop2 = ((BaseArmor)item).MaxHitPoints) > 0)
|
||||
{
|
||||
Value = prop;
|
||||
Cap = prop2;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if (item is BaseJewel)
|
||||
{
|
||||
if ((prop = ((BaseJewel)item).HitPoints) >= 0 && (prop2 = ((BaseJewel)item).MaxHitPoints) > 0)
|
||||
{
|
||||
Value = prop;
|
||||
Cap = prop2;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (item is BaseWeapon)
|
||||
{
|
||||
if ((prop = ((BaseWeapon)item).HitPoints) >= 0 && (prop2 = ((BaseWeapon)item).MaxHitPoints) > 0)
|
||||
{
|
||||
Value = prop;
|
||||
Cap = prop2;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if (item is BaseClothing)
|
||||
{
|
||||
if ((prop = ((BaseClothing)item).HitPoints) >= 0 && (prop2 = ((BaseClothing)item).MaxHitPoints) > 0)
|
||||
{
|
||||
Value = prop;
|
||||
Cap = prop2;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if (item is BaseTalisman)
|
||||
{
|
||||
if ((prop = ((BaseTalisman)item).HitPoints) >= 0 && (prop2 = ((BaseTalisman)item).MaxHitPoints) > 0)
|
||||
{
|
||||
Value = prop;
|
||||
Cap = prop2;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if (item is Spellbook)
|
||||
{
|
||||
if ((prop = ((Spellbook)item).HitPoints) >= 0 && (prop2 = ((Spellbook)item).MaxHitPoints) > 0)
|
||||
{
|
||||
Value = prop;
|
||||
Cap = prop2;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public class BlessedProperty : ValuedProperty
|
||||
{
|
||||
public override Catalog Catalog { get { return Catalog.None; } }
|
||||
public override int LabelNumber { get { return 1038021; } } // Blessed
|
||||
public override bool IsSpriteGraph { get { return true; } }
|
||||
public override int SpriteW { get { return 150; } }
|
||||
public override int SpriteH { get { return 210; } }
|
||||
|
||||
public override bool Matches(Item item)
|
||||
{
|
||||
return item.LootType == LootType.Blessed;
|
||||
}
|
||||
}
|
||||
|
||||
public class CursedProperty : ValuedProperty
|
||||
{
|
||||
public override Catalog Catalog { get { return Catalog.None; } }
|
||||
public override int LabelNumber { get { return 1049643; } } // cursed
|
||||
public override bool IsSpriteGraph { get { return true; } }
|
||||
public override int SpriteW { get { return 150; } }
|
||||
public override int SpriteH { get { return 240; } }
|
||||
|
||||
public override bool Matches(Item item)
|
||||
{
|
||||
return item.LootType == LootType.Cursed;
|
||||
}
|
||||
}
|
||||
|
||||
public class MedableArmorProperty : ValuedProperty
|
||||
{
|
||||
public override Catalog Catalog { get { return Catalog.Combat1; } }
|
||||
public override int Order { get { return 6; } }
|
||||
public override bool AlwaysVisible { get { return true; } }
|
||||
public override bool IsBoolen { get { return true; } }
|
||||
public override bool BoolenValue { get { return true; } }
|
||||
public override int LabelNumber { get { return 1159280; } } // Medable Armor
|
||||
public override int SpriteW { get { return 0; } }
|
||||
public override int SpriteH { get { return 150; } }
|
||||
|
||||
public double GetPropertyValue(Item item)
|
||||
{
|
||||
return item is BaseArmor ? Misc.RegenRates.GetArmorMeditationValue((BaseArmor)item) : 0;
|
||||
}
|
||||
|
||||
public override bool Matches(Item item)
|
||||
{
|
||||
double total = GetPropertyValue(item);
|
||||
|
||||
if (total != 0)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool Matches(List<Item> items)
|
||||
{
|
||||
double total = 0;
|
||||
|
||||
items.ForEach(x => total += GetPropertyValue(x));
|
||||
|
||||
if (total != 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public class GargoyleProperty : ValuedProperty
|
||||
{
|
||||
public override Catalog Catalog { get { return Catalog.None; } }
|
||||
public override int LabelNumber { get { return 1111709; } } // Gargoyles Only
|
||||
public override bool IsSpriteGraph { get { return true; } }
|
||||
public override int SpriteW { get { return 30; } }
|
||||
public override int SpriteH { get { return 270; } }
|
||||
|
||||
public override bool Matches(Item item)
|
||||
{
|
||||
if (item is BaseArmor && ((BaseArmor)item).CanBeWornByGargoyles)
|
||||
return true;
|
||||
|
||||
if (item is BaseJewel && ((BaseJewel)item).CanBeWornByGargoyles)
|
||||
return true;
|
||||
|
||||
if (item is BaseWeapon && ((BaseWeapon)item).CanBeWornByGargoyles)
|
||||
return true;
|
||||
|
||||
if (item is BaseClothing && ((BaseClothing)item).CanBeWornByGargoyles)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public class ElfProperty : ValuedProperty
|
||||
{
|
||||
public override Catalog Catalog { get { return Catalog.None; } }
|
||||
public override int LabelNumber { get { return 1075086; } } // Elves Only
|
||||
public override bool IsSpriteGraph { get { return true; } }
|
||||
public override int SpriteW { get { return 210; } }
|
||||
public override int SpriteH { get { return 240; } }
|
||||
|
||||
public override bool Matches(Item item)
|
||||
{
|
||||
if (item is BaseArmor && ((BaseArmor)item).RequiredRace == Race.Elf)
|
||||
return true;
|
||||
|
||||
if (item is BaseJewel && ((BaseJewel)item).RequiredRace == Race.Elf)
|
||||
return true;
|
||||
|
||||
if (item is BaseWeapon && ((BaseWeapon)item).RequiredRace == Race.Elf)
|
||||
return true;
|
||||
|
||||
if (item is BaseClothing && ((BaseClothing)item).RequiredRace == Race.Elf)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public class DamageModifierProperty : ValuedProperty
|
||||
{
|
||||
public override Catalog Catalog { get { return Catalog.Misc; } }
|
||||
public override int LabelNumber { get { return 1159401; } } // Damage Modifier
|
||||
public override int Description { get { return 1152402; } } // This property provides an increase to the damage you inflict on a successful ranged weapon attack. The bonus damage is applied to the net damage inflicted (after all damage and resistance calculations are made). This property can only be found on certain quivers.
|
||||
public override int Hue { get { return 0x43FF; } }
|
||||
public override int SpriteW { get { return 180; } }
|
||||
public override int SpriteH { get { return 270; } }
|
||||
|
||||
public double GetPropertyValue(Item item)
|
||||
{
|
||||
return item is BaseQuiver ? ((BaseQuiver)item).DamageIncrease : 0;
|
||||
}
|
||||
|
||||
public override bool Matches(Item item)
|
||||
{
|
||||
Value = GetPropertyValue(item);
|
||||
|
||||
if (Value != 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool Matches(List<Item> items)
|
||||
{
|
||||
double total = 0;
|
||||
|
||||
items.ForEach(x => total += GetPropertyValue(x));
|
||||
|
||||
Value = total;
|
||||
|
||||
if (Value != 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public class ManaPhaseProperty : ValuedProperty
|
||||
{
|
||||
public override Catalog Catalog { get { return Catalog.Combat1; } }
|
||||
public override int Order { get { return 10; } }
|
||||
public override bool IsBoolen { get { return true; } }
|
||||
public override int LabelNumber { get { return 1116158; } } // Mana Phase
|
||||
public override int Description { get { return 1152417; } } // This property reduces mana cost to 0. Mana phasing is a property that consumes charges. <br>When the effect is activated the next two mana checks are made at a cost of zero mana but one charge is consumed. The first mana check occurs when the mana consuming activity (starting to cast a spell, triggering a special move, etc.) is started and the second mana check occurs when the mana consuming activity is finalized (final targeting with the spell, the special move occurring, etc.). There is a 30 second cool down between uses. This property is currently only available on specific talisman.
|
||||
public override int SpriteW { get { return 240; } }
|
||||
public override int SpriteH { get { return 270; } }
|
||||
|
||||
public bool GetPropertyValue(Item item)
|
||||
{
|
||||
return item is ManaPhasingOrb;
|
||||
}
|
||||
|
||||
public override bool Matches(Item item)
|
||||
{
|
||||
return GetPropertyValue(item);
|
||||
}
|
||||
|
||||
public override bool Matches(List<Item> items)
|
||||
{
|
||||
foreach (Item i in items)
|
||||
{
|
||||
if (GetPropertyValue(i))
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public class SearingWeaponProperty : ValuedProperty
|
||||
{
|
||||
public override Catalog Catalog { get { return Catalog.HitEffects; } }
|
||||
public override bool IsBoolen { get { return true; } }
|
||||
public override int LabelNumber { get { return 1151183; } } // Searing Weapon
|
||||
public override int Description { get { return 1152471; } } // This property provides a 20% chance (10% for ranged weapons) to deal additional fire damage to a target while inflicting 4 points of direct damage to the wielder. This property also induces a hit point regeneration penalty on the target that lasts for four seconds. The penalty is -20 hit point regeneration for players and -60 hit point regeneration for monsters and NPCs. Each attack with a weapon with this property consumes one mana. This property is only found on weapons.
|
||||
public override int SpriteW { get { return 270; } }
|
||||
public override int SpriteH { get { return 270; } }
|
||||
|
||||
public bool GetPropertyValue(Item item)
|
||||
{
|
||||
return item is BaseWeapon && ((BaseWeapon)item).SearingWeapon;
|
||||
}
|
||||
|
||||
public override bool Matches(Item item)
|
||||
{
|
||||
return GetPropertyValue(item);
|
||||
}
|
||||
|
||||
public override bool Matches(List<Item> items)
|
||||
{
|
||||
foreach (Item i in items)
|
||||
{
|
||||
if (GetPropertyValue(i))
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
173
Scripts/Mobiles/NPCs/Mannequin/Property/ResistProperty.cs
Normal file
173
Scripts/Mobiles/NPCs/Mannequin/Property/ResistProperty.cs
Normal file
@@ -0,0 +1,173 @@
|
||||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Server.Mobiles.MannequinProperty
|
||||
{
|
||||
public abstract class ResistAttr : ValuedProperty
|
||||
{
|
||||
public override Catalog Catalog { get { return Catalog.Resistances; } }
|
||||
public override bool AlwaysVisible { get { return true; } }
|
||||
public abstract ResistanceType Resist { get; }
|
||||
public override int Hue { get { return 0x42FF; } }
|
||||
public override int Cap { get { return 70; } }
|
||||
|
||||
public double GetPropertyValue(Item item)
|
||||
{
|
||||
return GetBaseResistBonus(item, Resist);
|
||||
}
|
||||
|
||||
public override bool Matches(Item item)
|
||||
{
|
||||
Value = GetPropertyValue(item);
|
||||
|
||||
if (Value != 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool Matches(List<Item> items)
|
||||
{
|
||||
double total = 0;
|
||||
|
||||
items.ForEach(x => total += GetPropertyValue(x));
|
||||
|
||||
Value = total;
|
||||
|
||||
if (Value != 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public int GetBaseResistBonus(Item item, ResistanceType resist)
|
||||
{
|
||||
switch (resist)
|
||||
{
|
||||
case ResistanceType.Physical:
|
||||
{
|
||||
if (item is BaseWeapon)
|
||||
return ((BaseWeapon)item).PhysicalResistance;
|
||||
|
||||
if (item is BaseArmor)
|
||||
return ((BaseArmor)item).PhysicalResistance;
|
||||
|
||||
if (item is BaseClothing)
|
||||
return ((BaseClothing)item).PhysicalResistance;
|
||||
|
||||
break;
|
||||
}
|
||||
case ResistanceType.Fire:
|
||||
{
|
||||
if (item is BaseWeapon)
|
||||
return ((BaseWeapon)item).FireResistance;
|
||||
|
||||
if (item is BaseArmor)
|
||||
return ((BaseArmor)item).FireResistance;
|
||||
|
||||
if (item is BaseClothing)
|
||||
return ((BaseClothing)item).FireResistance;
|
||||
|
||||
break;
|
||||
}
|
||||
case ResistanceType.Cold:
|
||||
{
|
||||
if (item is BaseWeapon)
|
||||
return ((BaseWeapon)item).ColdResistance;
|
||||
|
||||
if (item is BaseArmor)
|
||||
return ((BaseArmor)item).ColdResistance;
|
||||
|
||||
if (item is BaseClothing)
|
||||
return ((BaseClothing)item).ColdResistance;
|
||||
|
||||
break;
|
||||
}
|
||||
case ResistanceType.Poison:
|
||||
{
|
||||
if (item is BaseWeapon)
|
||||
return ((BaseWeapon)item).PoisonResistance;
|
||||
|
||||
if (item is BaseArmor)
|
||||
return ((BaseArmor)item).PoisonResistance;
|
||||
|
||||
if (item is BaseClothing)
|
||||
return ((BaseClothing)item).PoisonResistance;
|
||||
|
||||
break;
|
||||
}
|
||||
case ResistanceType.Energy:
|
||||
{
|
||||
if (item is BaseWeapon)
|
||||
return ((BaseWeapon)item).EnergyResistance;
|
||||
|
||||
if (item is BaseArmor)
|
||||
return ((BaseArmor)item).EnergyResistance;
|
||||
|
||||
if (item is BaseClothing)
|
||||
return ((BaseClothing)item).EnergyResistance;
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
public class PhysicalResistProperty : ResistAttr
|
||||
{
|
||||
public override int Order { get { return 1; } }
|
||||
public override int LabelNumber { get { return 1079764; } } // Physical Resist
|
||||
public override ResistanceType Resist { get { return ResistanceType.Physical; } }
|
||||
public override int Description { get { return 1115226; } } // This property reduces the damage taken from attacks that cause physical damage. This property can be found on all armor, shields, accessories or weapons.
|
||||
public override int SpriteW { get { return 30; } }
|
||||
public override int SpriteH { get { return 30; } }
|
||||
}
|
||||
|
||||
public class FireResistProperty : ResistAttr
|
||||
{
|
||||
public override int Order { get { return 2; } }
|
||||
public override int LabelNumber { get { return 1079763; } } // Fire Resist
|
||||
public override ResistanceType Resist { get { return ResistanceType.Fire; } }
|
||||
public override int Description { get { return 1115227; } } // This property reduces the damage taken from attacks that cause fire damage. This property can be found on all armor, shields, accessories or weapons.
|
||||
public override int SpriteW { get { return 150; } }
|
||||
public override int SpriteH { get { return 0; } }
|
||||
}
|
||||
|
||||
public class ColdResistProperty : ResistAttr
|
||||
{
|
||||
public override int Order { get { return 3; } }
|
||||
public override int LabelNumber { get { return 1079761; } } // Cold Resist
|
||||
public override ResistanceType Resist { get { return ResistanceType.Cold; } }
|
||||
public override int Description { get { return 1115228; } } // This property reduces the damage taken from attacks that cause cold damage. This property can be found on all armor, shields, accessories or weapons.
|
||||
public override int SpriteW { get { return 0; } }
|
||||
public override int SpriteH { get { return 0; } }
|
||||
}
|
||||
|
||||
public class PoisonResistProperty : ResistAttr
|
||||
{
|
||||
public override int Order { get { return 4; } }
|
||||
public override int LabelNumber { get { return 1079765; } } // Poison Resist
|
||||
public override ResistanceType Resist { get { return ResistanceType.Poison; } }
|
||||
public override int Description { get { return 1115229; } } // This property reduces the damage taken from attacks that cause poison damage. This property can be found on all armor, shields, accessories or weapons.
|
||||
public override int SpriteW { get { return 60; } }
|
||||
public override int SpriteH { get { return 30; } }
|
||||
}
|
||||
|
||||
public class EnergyResistProperty : ResistAttr
|
||||
{
|
||||
public override int Order { get { return 5; } }
|
||||
public override int LabelNumber { get { return 1079762; } } // Energy Resist
|
||||
public override ResistanceType Resist { get { return ResistanceType.Energy; } }
|
||||
public override int Description { get { return 1115230; } } // This property reduces the damage taken from attacks that cause energy damage. This property can be found on all armor, shields, accessories or weapons.
|
||||
public override int SpriteW { get { return 120; } }
|
||||
public override int SpriteH { get { return 0; } }
|
||||
}
|
||||
}
|
||||
266
Scripts/Mobiles/NPCs/Mannequin/Property/SkillBonusAttribute.cs
Normal file
266
Scripts/Mobiles/NPCs/Mannequin/Property/SkillBonusAttribute.cs
Normal file
@@ -0,0 +1,266 @@
|
||||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Server.Mobiles.MannequinProperty
|
||||
{
|
||||
public abstract class SkillBonusAttr : ValuedProperty
|
||||
{
|
||||
public override Catalog Catalog { get { return Catalog.SkillBonusGear; } }
|
||||
public override int Description { get { return 1159316; } } // Increases your skill points in a particular skill, up to, but not exceeding your cap in that skill.
|
||||
public abstract SkillName Skill { get; }
|
||||
public override int Hue { get { return 0x42FF; } }
|
||||
public override int SpriteW { get { return 270; } }
|
||||
public override int SpriteH { get { return 300; } }
|
||||
|
||||
public double GetPropertyValue(Item item)
|
||||
{
|
||||
double value = 0;
|
||||
|
||||
AosSkillBonuses skillbonuses = RunicReforging.GetAosSkillBonuses(item);
|
||||
|
||||
if (skillbonuses != null)
|
||||
{
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
if (skillbonuses.GetValues(i, out SkillName check, out double bonus) && check == Skill && bonus > 0)
|
||||
{
|
||||
value += bonus;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
public override bool Matches(Item item)
|
||||
{
|
||||
Value = GetPropertyValue(item);
|
||||
|
||||
if (Value != 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool Matches(List<Item> items)
|
||||
{
|
||||
double total = 0;
|
||||
|
||||
foreach (var item in items)
|
||||
{
|
||||
total += GetPropertyValue(item);
|
||||
}
|
||||
|
||||
Value = total;
|
||||
|
||||
if (Value != 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public class SwordsBonusProperty : SkillBonusAttr
|
||||
{
|
||||
public override int LabelNumber { get { return 1002151; } } // Swordsmanship
|
||||
public override SkillName Skill { get { return SkillName.Swords; } }
|
||||
}
|
||||
|
||||
public class FencingBonusProperty : SkillBonusAttr
|
||||
{
|
||||
public override int LabelNumber { get { return 1044102; } } // Fencing
|
||||
public override SkillName Skill { get { return SkillName.Fencing; } }
|
||||
}
|
||||
|
||||
public class MacingBonusProperty : SkillBonusAttr
|
||||
{
|
||||
public override int LabelNumber { get { return 1044101; } } // Mace Fighting
|
||||
public override SkillName Skill { get { return SkillName.Macing; } }
|
||||
}
|
||||
|
||||
public class MageryBonusProperty : SkillBonusAttr
|
||||
{
|
||||
public override int LabelNumber { get { return 1002106; } } // Magery
|
||||
public override SkillName Skill { get { return SkillName.Magery; } }
|
||||
}
|
||||
|
||||
public class MusicianshipBonusProperty : SkillBonusAttr
|
||||
{
|
||||
public override int LabelNumber { get { return 1002116; } } // Musicianship
|
||||
public override SkillName Skill { get { return SkillName.Musicianship; } }
|
||||
}
|
||||
|
||||
public class WrestlingBonusProperty : SkillBonusAttr
|
||||
{
|
||||
public override int LabelNumber { get { return 1002169; } } // Wrestling
|
||||
public override SkillName Skill { get { return SkillName.Wrestling; } }
|
||||
}
|
||||
|
||||
public class TacticsBonusProperty : SkillBonusAttr
|
||||
{
|
||||
public override int LabelNumber { get { return 1017321; } } // Tactics
|
||||
public override SkillName Skill { get { return SkillName.Tactics; } }
|
||||
}
|
||||
|
||||
public class AnimalTamingBonusProperty : SkillBonusAttr
|
||||
{
|
||||
public override int LabelNumber { get { return 1044095; } } // Animal Taming
|
||||
public override SkillName Skill { get { return SkillName.AnimalTaming; } }
|
||||
}
|
||||
|
||||
public class ProvocationBonusProperty : SkillBonusAttr
|
||||
{
|
||||
public override int LabelNumber { get { return 1002125; } } // Provocation
|
||||
public override SkillName Skill { get { return SkillName.Provocation; } }
|
||||
}
|
||||
|
||||
public class SpiritSpeakBonusProperty : SkillBonusAttr
|
||||
{
|
||||
public override int LabelNumber { get { return 1002140; } } // Spirit Speak
|
||||
public override SkillName Skill { get { return SkillName.SpiritSpeak; } }
|
||||
}
|
||||
|
||||
public class StealthBonusProperty : SkillBonusAttr
|
||||
{
|
||||
public override int LabelNumber { get { return 1044107; } } // Stealth
|
||||
public override SkillName Skill { get { return SkillName.Stealth; } }
|
||||
}
|
||||
|
||||
public class ParryBonusProperty : SkillBonusAttr
|
||||
{
|
||||
public override int LabelNumber { get { return 1002118; } } // Parrying
|
||||
public override SkillName Skill { get { return SkillName.Parry; } }
|
||||
}
|
||||
|
||||
public class MeditationBonusProperty : SkillBonusAttr
|
||||
{
|
||||
public override int LabelNumber { get { return 1044106; } } // Meditation
|
||||
public override SkillName Skill { get { return SkillName.Meditation; } }
|
||||
}
|
||||
|
||||
public class AnimalLoreBonusProperty : SkillBonusAttr
|
||||
{
|
||||
public override int LabelNumber { get { return 1002007; } } // Animal Lore
|
||||
public override SkillName Skill { get { return SkillName.AnimalLore; } }
|
||||
}
|
||||
|
||||
public class DiscordanceBonusProperty : SkillBonusAttr
|
||||
{
|
||||
public override int LabelNumber { get { return 1044075; } } // Discordance
|
||||
public override SkillName Skill { get { return SkillName.Discordance; } }
|
||||
}
|
||||
|
||||
public class FocusBonusProperty : SkillBonusAttr
|
||||
{
|
||||
public override int LabelNumber { get { return 1044110; } } // Focus
|
||||
public override SkillName Skill { get { return SkillName.Focus; } }
|
||||
}
|
||||
|
||||
public class StealingBonusProperty : SkillBonusAttr
|
||||
{
|
||||
public override int LabelNumber { get { return 1002142; } } // Stealing
|
||||
public override SkillName Skill { get { return SkillName.Stealing; } }
|
||||
}
|
||||
|
||||
public class AnatomyBonusProperty : SkillBonusAttr
|
||||
{
|
||||
public override int LabelNumber { get { return 1002004; } } // Anatomy
|
||||
public override SkillName Skill { get { return SkillName.Anatomy; } }
|
||||
}
|
||||
|
||||
public class EvalIntBonusProperty : SkillBonusAttr
|
||||
{
|
||||
public override int LabelNumber { get { return 1044076; } } // Eval Intelligence
|
||||
public override SkillName Skill { get { return SkillName.EvalInt; } }
|
||||
}
|
||||
|
||||
public class VeterinaryBonusProperty : SkillBonusAttr
|
||||
{
|
||||
public override int LabelNumber { get { return 1044099; } } // Veterinary
|
||||
public override SkillName Skill { get { return SkillName.Veterinary; } }
|
||||
}
|
||||
|
||||
public class NecromancyBonusProperty : SkillBonusAttr
|
||||
{
|
||||
public override int LabelNumber { get { return 1044109; } } // Necromancy
|
||||
public override SkillName Skill { get { return SkillName.Necromancy; } }
|
||||
}
|
||||
|
||||
public class BushidoBonusProperty : SkillBonusAttr
|
||||
{
|
||||
public override int LabelNumber { get { return 1044112; } } // Bushido
|
||||
public override SkillName Skill { get { return SkillName.Bushido; } }
|
||||
}
|
||||
|
||||
public class MysticismBonusProperty : SkillBonusAttr
|
||||
{
|
||||
public override int LabelNumber { get { return 1044115; } } // Mysticism
|
||||
public override SkillName Skill { get { return SkillName.Mysticism; } }
|
||||
}
|
||||
|
||||
public class HealingBonusProperty : SkillBonusAttr
|
||||
{
|
||||
public override int LabelNumber { get { return 1002082; } } // Healing
|
||||
public override SkillName Skill { get { return SkillName.Healing; } }
|
||||
}
|
||||
|
||||
public class MagicResistBonusProperty : SkillBonusAttr
|
||||
{
|
||||
public override int LabelNumber { get { return 1049662; } } // Resisting Spells
|
||||
public override SkillName Skill { get { return SkillName.MagicResist; } }
|
||||
}
|
||||
|
||||
public class PeacemakingBonusProperty : SkillBonusAttr
|
||||
{
|
||||
public override int LabelNumber { get { return 1002120; } } // Peacemaking
|
||||
public override SkillName Skill { get { return SkillName.Peacemaking; } }
|
||||
}
|
||||
|
||||
public class ArcheryBonusProperty : SkillBonusAttr
|
||||
{
|
||||
public override int LabelNumber { get { return 1002029; } } // Archery
|
||||
public override SkillName Skill { get { return SkillName.Archery; } }
|
||||
}
|
||||
|
||||
public class ChivalryBonusProperty : SkillBonusAttr
|
||||
{
|
||||
public override int LabelNumber { get { return 1044111; } } // Chivalry
|
||||
public override SkillName Skill { get { return SkillName.Chivalry; } }
|
||||
}
|
||||
|
||||
public class NinjitsuBonusProperty : SkillBonusAttr
|
||||
{
|
||||
public override int LabelNumber { get { return 1044113; } } // Ninjitsu
|
||||
public override SkillName Skill { get { return SkillName.Ninjitsu; } }
|
||||
}
|
||||
|
||||
public class ThrowingBonusProperty : SkillBonusAttr
|
||||
{
|
||||
public override int LabelNumber { get { return 1044117; } } // Throwing
|
||||
public override SkillName Skill { get { return SkillName.Throwing; } }
|
||||
}
|
||||
|
||||
public class LumberjackingBonusProperty : SkillBonusAttr
|
||||
{
|
||||
public override int LabelNumber { get { return 1044104; } } // Lumberjacking
|
||||
public override SkillName Skill { get { return SkillName.Lumberjacking; } }
|
||||
}
|
||||
|
||||
public class SnoopingBonusProperty : SkillBonusAttr
|
||||
{
|
||||
public override int LabelNumber { get { return 1044088; } } // Snooping
|
||||
public override SkillName Skill { get { return SkillName.Snooping; } }
|
||||
}
|
||||
|
||||
public class MiningBonusProperty : SkillBonusAttr
|
||||
{
|
||||
public override int LabelNumber { get { return 1044105; } } // Mining
|
||||
public override SkillName Skill { get { return SkillName.Mining; } }
|
||||
}
|
||||
}
|
||||
277
Scripts/Mobiles/NPCs/Mannequin/Property/SlayerAttribute.cs
Normal file
277
Scripts/Mobiles/NPCs/Mannequin/Property/SlayerAttribute.cs
Normal file
@@ -0,0 +1,277 @@
|
||||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Server.Mobiles.MannequinProperty
|
||||
{
|
||||
public abstract class SlayerProperty : ValuedProperty
|
||||
{
|
||||
public override Catalog Catalog { get { return Catalog.HitEffects; } }
|
||||
public abstract SlayerName Slayer { get; }
|
||||
public override int Hue { get { return 0x43FF; } }
|
||||
public override bool IsBoolen { get { return true; } }
|
||||
public override int Description { get { return 1152467; } } // This property provides increased effectiveness against specific monsters or specific groups of monsters. When the property is found on weapons or talisman it increases damage inflicted by weapons. When this property is found on spellbooks it increases spell damage. <br>When this property is found on instruments it increases the success chances for barding attempts (peacemaking, provocation or discordance); it also increases damage inflicted when using the discordance bard mastery abilities. When a character uses slayer items they will be more vulnerable to opposing groups of monsters. This vulnerability ranges from taking more damage from opposing monsters to less effective barding attempts.
|
||||
public override int SpriteW { get { return 270; } }
|
||||
public override int SpriteH { get { return 180; } }
|
||||
|
||||
public override bool Matches(Item item)
|
||||
{
|
||||
return item is ISlayer slayer ? slayer.Slayer == Slayer || slayer.Slayer2 == Slayer : false;
|
||||
}
|
||||
|
||||
public override bool Matches(List<Item> items)
|
||||
{
|
||||
foreach (var item in items)
|
||||
{
|
||||
if (item is ISlayer slayer)
|
||||
return slayer.Slayer == Slayer || slayer.Slayer2 == Slayer;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public abstract class TalismanSlayerProperty : ValuedProperty
|
||||
{
|
||||
public override Catalog Catalog { get { return Catalog.HitEffects; } }
|
||||
public abstract TalismanSlayerName Slayer { get; }
|
||||
public override int Hue { get { return 0x43FF; } }
|
||||
public override bool IsBoolen { get { return true; } }
|
||||
public override int SpriteW { get { return 270; } }
|
||||
public override int SpriteH { get { return 180; } }
|
||||
|
||||
public override bool Matches(Item item)
|
||||
{
|
||||
return item is BaseTalisman talisman ? talisman.Slayer == Slayer : false;
|
||||
}
|
||||
|
||||
public override bool Matches(List<Item> items)
|
||||
{
|
||||
foreach (var item in items)
|
||||
{
|
||||
if (item is BaseTalisman talisman)
|
||||
return talisman.Slayer == Slayer;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public class ReptileSlayerProperty : SlayerProperty
|
||||
{
|
||||
public override int LabelNumber { get { return 1079751; } } // Reptile Slayer
|
||||
public override SlayerName Slayer { get { return SlayerName.ReptilianDeath; } }
|
||||
}
|
||||
|
||||
public class DragonSlayerProperty : SlayerProperty
|
||||
{
|
||||
public override int LabelNumber { get { return 1061284; } } // Dragon Slayer
|
||||
public override SlayerName Slayer { get { return SlayerName.DragonSlaying; } }
|
||||
}
|
||||
|
||||
public class LizardmanSlayerProperty : SlayerProperty
|
||||
{
|
||||
public override int LabelNumber { get { return 1079738; } } // Lizardman Slayer
|
||||
public override SlayerName Slayer { get { return SlayerName.LizardmanSlaughter; } }
|
||||
}
|
||||
|
||||
public class OphidianSlayerProperty : SlayerProperty
|
||||
{
|
||||
public override int LabelNumber { get { return 1079740; } } // Ophidian Slayer
|
||||
public override SlayerName Slayer { get { return SlayerName.Ophidian; } }
|
||||
}
|
||||
|
||||
public class SnakeSlayerProperty : SlayerProperty
|
||||
{
|
||||
public override int LabelNumber { get { return 1079744; } } // Snake Slayer
|
||||
public override SlayerName Slayer { get { return SlayerName.SnakesBane; } }
|
||||
}
|
||||
|
||||
public class ArachnidSlayerProperty : SlayerProperty
|
||||
{
|
||||
public override int LabelNumber { get { return 1079747; } } // Arachnid Slayer
|
||||
public override SlayerName Slayer { get { return SlayerName.ArachnidDoom; } }
|
||||
}
|
||||
|
||||
public class ScorpionSlayerProperty : SlayerProperty
|
||||
{
|
||||
public override int LabelNumber { get { return 1079743; } } // Scorpion Slayer
|
||||
public override SlayerName Slayer { get { return SlayerName.ScorpionsBane; } }
|
||||
}
|
||||
|
||||
public class SpiderSlayerProperty : SlayerProperty
|
||||
{
|
||||
public override int LabelNumber { get { return 1079746; } } // Spider Slayer
|
||||
public override SlayerName Slayer { get { return SlayerName.SpidersDeath; } }
|
||||
}
|
||||
|
||||
public class TerathanSlayerProperty : SlayerProperty
|
||||
{
|
||||
public override int LabelNumber { get { return 1079753; } } // Terathan Slayer
|
||||
public override SlayerName Slayer { get { return SlayerName.Terathan; } }
|
||||
}
|
||||
|
||||
public class RepondSlayerProperty : SlayerProperty
|
||||
{
|
||||
public override int LabelNumber { get { return 1079750; } } // Repond Slayer
|
||||
public override SlayerName Slayer { get { return SlayerName.Repond; } }
|
||||
}
|
||||
|
||||
public class BatSlayerProperty : TalismanSlayerProperty
|
||||
{
|
||||
public override int LabelNumber { get { return 1072506; } } // Bat Slayer
|
||||
public override TalismanSlayerName Slayer { get { return TalismanSlayerName.Bat; } }
|
||||
}
|
||||
|
||||
public class BearSlayerProperty : TalismanSlayerProperty
|
||||
{
|
||||
public override int LabelNumber { get { return 1072504; } } // Bear Slayer
|
||||
public override TalismanSlayerName Slayer { get { return TalismanSlayerName.Bear; } }
|
||||
}
|
||||
|
||||
public class BeetleSlayerProperty : TalismanSlayerProperty
|
||||
{
|
||||
public override int LabelNumber { get { return 1072508; } } // Beetle Slayer
|
||||
public override TalismanSlayerName Slayer { get { return TalismanSlayerName.Beetle; } }
|
||||
}
|
||||
|
||||
public class BirdSlayerProperty : TalismanSlayerProperty
|
||||
{
|
||||
public override int LabelNumber { get { return 1072509; } } // Bird Slayer
|
||||
public override TalismanSlayerName Slayer { get { return TalismanSlayerName.Bird; } }
|
||||
}
|
||||
|
||||
public class BovineSlayerProperty : TalismanSlayerProperty
|
||||
{
|
||||
public override int LabelNumber { get { return 1072512; } } // Bovine Slayer
|
||||
public override TalismanSlayerName Slayer { get { return TalismanSlayerName.Bovine; } }
|
||||
}
|
||||
|
||||
public class FlameSlayerProperty : TalismanSlayerProperty
|
||||
{
|
||||
public override int LabelNumber { get { return 1072511; } } // Flame Slayer
|
||||
public override TalismanSlayerName Slayer { get { return TalismanSlayerName.Flame; } }
|
||||
}
|
||||
|
||||
public class GoblinSlayerProperty : TalismanSlayerProperty
|
||||
{
|
||||
public override int LabelNumber { get { return 1095010; } } // Goblin Slayer
|
||||
public override TalismanSlayerName Slayer { get { return TalismanSlayerName.Goblin; } }
|
||||
}
|
||||
|
||||
public class IceSlayerProperty : TalismanSlayerProperty
|
||||
{
|
||||
public override int LabelNumber { get { return 1072510; } } // Ice Slayer
|
||||
public override TalismanSlayerName Slayer { get { return TalismanSlayerName.Ice; } }
|
||||
}
|
||||
|
||||
public class MageSlayerProperty : TalismanSlayerProperty
|
||||
{
|
||||
public override int LabelNumber { get { return 1072507; } } // Mage Slayer
|
||||
public override TalismanSlayerName Slayer { get { return TalismanSlayerName.Mage; } }
|
||||
}
|
||||
|
||||
public class OgreSlayerProperty : SlayerProperty
|
||||
{
|
||||
public override int LabelNumber { get { return 1079739; } } // Ogre Slayer
|
||||
public override SlayerName Slayer { get { return SlayerName.OgreTrashing; } }
|
||||
}
|
||||
|
||||
public class OrcSlayerProperty : SlayerProperty
|
||||
{
|
||||
public override int LabelNumber { get { return 1079741; } } // Orc Slayer
|
||||
public override SlayerName Slayer { get { return SlayerName.OrcSlaying; } }
|
||||
}
|
||||
|
||||
public class TrollSlayerProperty : SlayerProperty
|
||||
{
|
||||
public override int LabelNumber { get { return 1079754; } } // Troll Slayer
|
||||
public override SlayerName Slayer { get { return SlayerName.TrollSlaughter; } }
|
||||
}
|
||||
|
||||
public class VerminSlayerProperty : TalismanSlayerProperty
|
||||
{
|
||||
public override int LabelNumber { get { return 1072505; } } // Vermin Slayer
|
||||
public override TalismanSlayerName Slayer { get { return TalismanSlayerName.Vermin; } }
|
||||
}
|
||||
|
||||
public class UndeadSlayerProperty : SlayerProperty
|
||||
{
|
||||
public override int LabelNumber { get { return 1079752; } } // Undead Slayer
|
||||
public override int Description { get { return 1152467; } } // This property provides increased effectiveness against specific monsters or specific groups of monsters. When the property is found on weapons or talisman it increases damage inflicted by weapons. When this property is found on spellbooks it increases spell damage. <br>When this property is found on instruments it increases the success chances for barding attempts (peacemaking, provocation or discordance); it also increases damage inflicted when using the discordance bard mastery abilities. When a character uses slayer items they will be more vulnerable to opposing groups of monsters. This vulnerability ranges from taking more damage from opposing monsters to less effective barding attempts.
|
||||
public override SlayerName Slayer { get { return SlayerName.Silver; } }
|
||||
}
|
||||
|
||||
public class WolfSlayerProperty : TalismanSlayerProperty
|
||||
{
|
||||
public override int LabelNumber { get { return 1075462; } } // Wolf Slayer
|
||||
public override TalismanSlayerName Slayer { get { return TalismanSlayerName.Wolf; } }
|
||||
}
|
||||
|
||||
public class DemonSlayerProperty : SlayerProperty
|
||||
{
|
||||
public override int LabelNumber { get { return 1079748; } } // Demon Slayer
|
||||
public override SlayerName Slayer { get { return SlayerName.Exorcism; } }
|
||||
}
|
||||
|
||||
public class GargoyleSlayerProperty : SlayerProperty
|
||||
{
|
||||
public override int LabelNumber { get { return 1079737; } } // Gargoyle Slayer
|
||||
public override SlayerName Slayer { get { return SlayerName.GargoylesFoe; } }
|
||||
}
|
||||
|
||||
public class FeySlayerProperty : SlayerProperty
|
||||
{
|
||||
public override int LabelNumber { get { return 1154652; } } // Fey Slayer
|
||||
public override SlayerName Slayer { get { return SlayerName.Fey; } }
|
||||
}
|
||||
|
||||
public class ElementalSlayerProperty : SlayerProperty
|
||||
{
|
||||
public override int LabelNumber { get { return 1079749; } } // Elemental Slayer
|
||||
public override SlayerName Slayer { get { return SlayerName.ElementalBan; } }
|
||||
}
|
||||
|
||||
public class AirElementalSlayerProperty : SlayerProperty
|
||||
{
|
||||
public override int LabelNumber { get { return 1079733; } } // Air Elemental Slayer
|
||||
public override SlayerName Slayer { get { return SlayerName.Vacuum; } }
|
||||
}
|
||||
|
||||
public class BloodElementalSlayerProperty : SlayerProperty
|
||||
{
|
||||
public override int LabelNumber { get { return 1079734; } } // Blood Elemental Slayer
|
||||
public override SlayerName Slayer { get { return SlayerName.BloodDrinking; } }
|
||||
}
|
||||
|
||||
public class EarthElementalSlayerProperty : SlayerProperty
|
||||
{
|
||||
public override int LabelNumber { get { return 1079735; } } // Earth Elemental Slayer
|
||||
public override SlayerName Slayer { get { return SlayerName.EarthShatter; } }
|
||||
}
|
||||
|
||||
public class FireElementalSlayerProperty : SlayerProperty
|
||||
{
|
||||
public override int LabelNumber { get { return 1079736; } } // Fire Elemental Slayer
|
||||
public override SlayerName Slayer { get { return SlayerName.FlameDousing; } }
|
||||
}
|
||||
|
||||
public class PoisonElementalSlayerProperty : SlayerProperty
|
||||
{
|
||||
public override int LabelNumber { get { return 1079742; } } // Poison Elemental Slayer
|
||||
public override SlayerName Slayer { get { return SlayerName.ElementalHealth; } }
|
||||
}
|
||||
|
||||
public class SnowElementalSlayerProperty : SlayerProperty
|
||||
{
|
||||
public override int LabelNumber { get { return 1079745; } } // Snow Elemental Slayer
|
||||
public override SlayerName Slayer { get { return SlayerName.SummerWind; } }
|
||||
}
|
||||
|
||||
public class WaterElementalSlayerProperty : SlayerProperty
|
||||
{
|
||||
public override SlayerName Slayer { get { return SlayerName.WaterDissipation; } }
|
||||
public override int LabelNumber { get { return 1079755; } } // Water Elemental Slayer
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,488 @@
|
||||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Server.Mobiles.MannequinProperty
|
||||
{
|
||||
public abstract class WeaponAttr : ValuedProperty
|
||||
{
|
||||
public abstract AosWeaponAttribute Attribute { get; }
|
||||
|
||||
public double GetPropertyValue(Item item)
|
||||
{
|
||||
return item is BaseWeapon ? ((BaseWeapon)item).WeaponAttributes[Attribute] : 0;
|
||||
}
|
||||
|
||||
public override bool Matches(Item item)
|
||||
{
|
||||
double total = GetPropertyValue(item);
|
||||
|
||||
if (!IsBoolen)
|
||||
Value = GetPropertyValue(item);
|
||||
|
||||
if (total != 0)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool Matches(List<Item> items)
|
||||
{
|
||||
double total = 0;
|
||||
|
||||
items.ForEach(x => total += GetPropertyValue(x));
|
||||
|
||||
if (!IsBoolen)
|
||||
Value = total;
|
||||
|
||||
if (total != 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public class WeaponSelfRepairProperty : WeaponAttr
|
||||
{
|
||||
public override Catalog Catalog { get { return Catalog.None; } }
|
||||
public override int LabelNumber { get { return 1079709; } } // Self Repair
|
||||
public override bool IsSpriteGraph { get { return true; } }
|
||||
public override int SpriteW { get { return 0; } }
|
||||
public override int SpriteH { get { return 300; } }
|
||||
public override AosWeaponAttribute Attribute { get { return AosWeaponAttribute.SelfRepair; } }
|
||||
}
|
||||
|
||||
public class HitLeechHitsProperty : WeaponAttr
|
||||
{
|
||||
public override Catalog Catalog { get { return Catalog.HitEffects; } }
|
||||
public override int LabelNumber { get { return 1079698; } } // Hit Life Leech
|
||||
public override int Description { get { return 1152425; } } // This property provides a chance to leech hit points from the target. The amount of hit points leeched from the target is up to 30% of the damage inflicted. This property can be found on all weapons.
|
||||
public override AosWeaponAttribute Attribute { get { return AosWeaponAttribute.HitLeechHits; } }
|
||||
public override int Hue { get { return 0x43FF; } }
|
||||
public override int SpriteW { get { return 90; } }
|
||||
public override int SpriteH { get { return 180; } }
|
||||
}
|
||||
|
||||
public class HitLeechStamProperty : WeaponAttr
|
||||
{
|
||||
public override Catalog Catalog { get { return Catalog.HitEffects; } }
|
||||
public override int LabelNumber { get { return 1079707; } } // Hit Stamina Leech
|
||||
public override int Description { get { return 1152423; } } // This property provides a chance to leech stamina from the target. The amount of stamina leeched from the target is 100% of the damage inflicted. This property can be found on all weapons.
|
||||
public override AosWeaponAttribute Attribute { get { return AosWeaponAttribute.HitLeechStam; } }
|
||||
public override int Hue { get { return 0x43FF; } }
|
||||
public override int SpriteW { get { return 150; } }
|
||||
public override int SpriteH { get { return 180; } }
|
||||
}
|
||||
|
||||
public class HitLeechManaProperty : WeaponAttr
|
||||
{
|
||||
public override Catalog Catalog { get { return Catalog.HitEffects; } }
|
||||
public override int LabelNumber { get { return 1079701; } } // Hit Mana Leech
|
||||
public override int Description { get { return 1152424; } } // This property provides a chance to leech mana from the target. The amount of mana leeched from the target is up to 40% of the damage inflicted. This property can be found on all weapons.
|
||||
public override AosWeaponAttribute Attribute { get { return AosWeaponAttribute.HitLeechMana; } }
|
||||
public override int Hue { get { return 0x43FF; } }
|
||||
public override int SpriteW { get { return 120; } }
|
||||
public override int SpriteH { get { return 180; } }
|
||||
}
|
||||
|
||||
public class HitLowerAttackProperty : WeaponAttr
|
||||
{
|
||||
public override Catalog Catalog { get { return Catalog.HitEffects; } }
|
||||
public override int LabelNumber { get { return 1079699; } } // Hit Lower Attack
|
||||
public override int Description { get { return 1152420; } } // This property provides a chance to lower the target’s hit chance increase. The effect reduces the target’s hit chance increase by 25% (40% hit chance increase is reduced to 15% hit chance increase) for 10 seconds if inflicted by melee weapons and 7 seconds for ranged weapons. This property does not stack from different sources and each successful hit while the target is under the effect will reset the duration timer. This property can be found on all weapons.
|
||||
public override AosWeaponAttribute Attribute { get { return AosWeaponAttribute.HitLowerAttack; } }
|
||||
public override int Hue { get { return 0x43FF; } }
|
||||
public override int SpriteW { get { return 0; } }
|
||||
public override int SpriteH { get { return 120; } }
|
||||
}
|
||||
|
||||
public class HitLowerDefendProperty : WeaponAttr
|
||||
{
|
||||
public override Catalog Catalog { get { return Catalog.HitEffects; } }
|
||||
public override int LabelNumber { get { return 1079700; } } // Hit Lower Defense
|
||||
public override int Description { get { return 1152419; } } // This property provides a chance to lower the target’s defense chance increase. The effect reduces the target’s defense chance increase by 25% (40% defense chance increase is reduced to 15% defense chance increase) for 8 seconds if inflicted by melee weapons and 5 seconds for ranged weapons. This property does not stack from different sources and each successful hit while the target is under the effect will reset the duration timer. This property can be found on all weapons.
|
||||
public override AosWeaponAttribute Attribute { get { return AosWeaponAttribute.HitLowerDefend; } }
|
||||
public override int Hue { get { return 0x43FF; } }
|
||||
public override int SpriteW { get { return 30; } }
|
||||
public override int SpriteH { get { return 120; } }
|
||||
}
|
||||
|
||||
public class HitMagicArrowProperty : WeaponAttr
|
||||
{
|
||||
public override Catalog Catalog { get { return Catalog.HitEffects; } }
|
||||
public override int LabelNumber { get { return 1079706; } } // Hit Magic Arrow
|
||||
public override int Description { get { return 1152427; } } // This property provides a chance to cast a magic arrow spell on the target. The magic arrow effect is similar to the magery first circle spell magic arrow. The property can be found on all weapons.
|
||||
public override AosWeaponAttribute Attribute { get { return AosWeaponAttribute.HitMagicArrow; } }
|
||||
public override int Hue { get { return 0x43FF; } }
|
||||
public override int SpriteW { get { return 270; } }
|
||||
public override int SpriteH { get { return 150; } }
|
||||
}
|
||||
|
||||
public class HitHarmProperty : WeaponAttr
|
||||
{
|
||||
public override Catalog Catalog { get { return Catalog.HitEffects; } }
|
||||
public override int LabelNumber { get { return 1079704; } } // Hit Harm
|
||||
public override int Description { get { return 1152413; } } // This property provides a chance to cast a harm spell on the target. The harm effect is similar to the magery second circle spell harm. This property can be found on all weapons.
|
||||
public override AosWeaponAttribute Attribute { get { return AosWeaponAttribute.HitHarm; } }
|
||||
public override int Hue { get { return 0x43FF; } }
|
||||
public override int SpriteW { get { return 0; } }
|
||||
public override int SpriteH { get { return 180; } }
|
||||
}
|
||||
|
||||
public class HitFireballProperty : WeaponAttr
|
||||
{
|
||||
public override Catalog Catalog { get { return Catalog.HitEffects; } }
|
||||
public override int LabelNumber { get { return 1079703; } } // Hit Fireball
|
||||
public override int Description { get { return 1152412; } } // This property provides a chance to cast a fireball spell on the target. The fireball effect is similar to the magery third circle spell fireball. This property can be found on all weapons.
|
||||
public override AosWeaponAttribute Attribute { get { return AosWeaponAttribute.HitFireball; } }
|
||||
public override int Hue { get { return 0x43FF; } }
|
||||
public override int SpriteW { get { return 210; } }
|
||||
public override int SpriteH { get { return 150; } }
|
||||
}
|
||||
|
||||
public class HitLightningProperty : WeaponAttr
|
||||
{
|
||||
public override Catalog Catalog { get { return Catalog.HitEffects; } }
|
||||
public override int LabelNumber { get { return 1079705; } } // Hit Lightning
|
||||
public override int Description { get { return 1152426; } } // This property provides a chance to cast a lightning spell on the target. The lightning effect is similar to the magery fourth circle spell lightning. The property can be found on all weapons.
|
||||
public override AosWeaponAttribute Attribute { get { return AosWeaponAttribute.HitLightning; } }
|
||||
public override int Hue { get { return 0x43FF; } }
|
||||
public override int SpriteW { get { return 240; } }
|
||||
public override int SpriteH { get { return 150; } }
|
||||
}
|
||||
|
||||
public class HitDispelProperty : WeaponAttr
|
||||
{
|
||||
public override Catalog Catalog { get { return Catalog.HitEffects; } }
|
||||
public override int LabelNumber { get { return 1079702; } } // Hit Dispel
|
||||
public override int Description { get { return 1152409; } } // This property provides a chance to dispel a summoned creature. The chance to dispel the target is based on the player’s tactics skill level. This property can be found on all weapons.
|
||||
public override AosWeaponAttribute Attribute { get { return AosWeaponAttribute.HitDispel; } }
|
||||
public override int Hue { get { return 0x43FF; } }
|
||||
public override int SpriteW { get { return 30; } }
|
||||
public override int SpriteH { get { return 180; } }
|
||||
}
|
||||
|
||||
public class HitColdAreaProperty : WeaponAttr
|
||||
{
|
||||
public override Catalog Catalog { get { return Catalog.HitEffects; } }
|
||||
public override int LabelNumber { get { return 1079693; } } // Hit Cold Area
|
||||
public override int Description { get { return 1152422; } } // This property provides a chance to deal additional splash damage. The hit area property provides a chance to deal additional (physical, fire, cold, poison or energy) damage based on half of the weapon damage inflicted to the primary target. The splash damage is not inflicted to the original target, but is inflicted to legally attackable targets near the original target. This property can be found on all weapons.
|
||||
public override AosWeaponAttribute Attribute { get { return AosWeaponAttribute.HitColdArea; } }
|
||||
public override int Hue { get { return 0x43FF; } }
|
||||
public override int SpriteW { get { return 120; } }
|
||||
public override int SpriteH { get { return 150; } }
|
||||
}
|
||||
|
||||
public class HitFireAreaProperty : WeaponAttr
|
||||
{
|
||||
public override Catalog Catalog { get { return Catalog.HitEffects; } }
|
||||
public override int LabelNumber { get { return 1079695; } } // Hit Fire Area
|
||||
public override int Description { get { return 1152422; } } // This property provides a chance to deal additional splash damage. The hit area property provides a chance to deal additional (physical, fire, cold, poison or energy) damage based on half of the weapon damage inflicted to the primary target. The splash damage is not inflicted to the original target, but is inflicted to legally attackable targets near the original target. This property can be found on all weapons.
|
||||
public override AosWeaponAttribute Attribute { get { return AosWeaponAttribute.HitFireArea; } }
|
||||
public override int Hue { get { return 0x43FF; } }
|
||||
public override int SpriteW { get { return 90; } }
|
||||
public override int SpriteH { get { return 150; } }
|
||||
}
|
||||
|
||||
public class HitPoisonAreaProperty : WeaponAttr
|
||||
{
|
||||
public override Catalog Catalog { get { return Catalog.HitEffects; } }
|
||||
public override int LabelNumber { get { return 1079697; } } // Hit Poison Area
|
||||
public override int Description { get { return 1152422; } } // This property provides a chance to deal additional splash damage. The hit area property provides a chance to deal additional (physical, fire, cold, poison or energy) damage based on half of the weapon damage inflicted to the primary target. The splash damage is not inflicted to the original target, but is inflicted to legally attackable targets near the original target. This property can be found on all weapons. s
|
||||
public override AosWeaponAttribute Attribute { get { return AosWeaponAttribute.HitPoisonArea; } }
|
||||
public override int Hue { get { return 0x43FF; } }
|
||||
public override int SpriteW { get { return 150; } }
|
||||
public override int SpriteH { get { return 150; } }
|
||||
}
|
||||
|
||||
public class HitEnergyAreaProperty : WeaponAttr
|
||||
{
|
||||
public override Catalog Catalog { get { return Catalog.HitEffects; } }
|
||||
public override int LabelNumber { get { return 1079694; } } // Hit Energy Area
|
||||
public override int Description { get { return 1152422; } } // This property provides a chance to deal additional splash damage. The hit area property provides a chance to deal additional (physical, fire, cold, poison or energy) damage based on half of the weapon damage inflicted to the primary target. The splash damage is not inflicted to the original target, but is inflicted to legally attackable targets near the original target. This property can be found on all weapons.
|
||||
public override AosWeaponAttribute Attribute { get { return AosWeaponAttribute.HitEnergyArea; } }
|
||||
public override int Hue { get { return 0x43FF; } }
|
||||
public override int SpriteW { get { return 180; } }
|
||||
public override int SpriteH { get { return 150; } }
|
||||
}
|
||||
|
||||
public class HitPhysicalAreaProperty : WeaponAttr
|
||||
{
|
||||
public override Catalog Catalog { get { return Catalog.HitEffects; } }
|
||||
public override int LabelNumber { get { return 1079696; } } // Hit Physical Area
|
||||
public override int Description { get { return 1152422; } } // This property provides a chance to deal additional splash damage. The hit area property provides a chance to deal additional (physical, fire, cold, poison or energy) damage based on half of the weapon damage inflicted to the primary target. The splash damage is not inflicted to the original target, but is inflicted to legally attackable targets near the original target. This property can be found on all weapons.
|
||||
public override AosWeaponAttribute Attribute { get { return AosWeaponAttribute.HitPhysicalArea; } }
|
||||
public override int Hue { get { return 0x43FF; } }
|
||||
public override int SpriteW { get { return 60; } }
|
||||
public override int SpriteH { get { return 150; } }
|
||||
}
|
||||
|
||||
public class UseBestWeaponSkillProperty : WeaponAttr
|
||||
{
|
||||
public override Catalog Catalog { get { return Catalog.Combat1; } }
|
||||
public override bool IsBoolen { get { return true; } }
|
||||
public override int LabelNumber { get { return 1079592; } } // Use Best Weapon Skill
|
||||
public override int Description { get { return 1152393; } } // This property allows a player to use a weapon as long as they have a weapon skill (fencing, mace fighting or swordsmanship). The weapon functions as if the player’s highest weapon skill is the appropriate skill. The wrestling, archery and throwing skills are excluded from this property. This property is only found on melee weapons.
|
||||
public override AosWeaponAttribute Attribute { get { return AosWeaponAttribute.UseBestSkill; } }
|
||||
public override int Hue { get { return 0x5E5D; } }
|
||||
public override int SpriteW { get { return 30; } }
|
||||
public override int SpriteH { get { return 330; } }
|
||||
}
|
||||
|
||||
public class MageWeaponProperty : WeaponAttr
|
||||
{
|
||||
public override Catalog Catalog { get { return Catalog.Casting; } }
|
||||
public override int LabelNumber { get { return 1079759; } } // Mage Weapon
|
||||
public override int Description { get { return 1152428; } } // This property modifies a weapon so that it uses a player’s magery skill as the weapons required weapon skill instead of the weapons default required weapon skill (archery, fencing, throwing, etc.). The wielder will also be subject to any listed penalty to their magery skill. This property can only be found on weapons.
|
||||
public override AosWeaponAttribute Attribute { get { return AosWeaponAttribute.MageWeapon; } }
|
||||
public override int Hue { get { return 0x1FF; } }
|
||||
public override int SpriteW { get { return 0; } }
|
||||
public override int SpriteH { get { return 150; } }
|
||||
}
|
||||
|
||||
public class BloodDrinkerProperty : WeaponAttr
|
||||
{
|
||||
public override Catalog Catalog { get { return Catalog.HitEffects; } }
|
||||
public override bool IsBoolen { get { return true; } }
|
||||
public override int LabelNumber { get { return 1113591; } } // Blood Drinker
|
||||
public override int Description { get { return 1152387; } } // This property will allow an attacker to gain hit points when using the bleed attack special move. All of the damage inflicted through the bleed attack is directly transferred back to the attacker’s health. This property is only found on weapons that allow use of the bleed attack special move.
|
||||
public override AosWeaponAttribute Attribute { get { return AosWeaponAttribute.BloodDrinker; } }
|
||||
public override int Hue { get { return 0x43FF; } }
|
||||
public override int SpriteW { get { return 120; } }
|
||||
public override int SpriteH { get { return 120; } }
|
||||
}
|
||||
|
||||
public class BattleLustProperty : WeaponAttr
|
||||
{
|
||||
public override Catalog Catalog { get { return Catalog.HitEffects; } }
|
||||
public override bool IsBoolen { get { return true; } }
|
||||
public override int LabelNumber { get { return 1113710; } } // Battle Lust
|
||||
public override int Description { get { return 1152385; } } // This property initiates a damage increase that is modified by several factors. Significant damage received from opponents will be added to the attacker’s Battle Lust, causing them to do more damage to all opponents the attacker engages. This damage bonus is further modified by how many opponents the attacker is aggressed against. The damage bonus is 15% per opponent, with a cap of 45% in PvP and 90% in PvM. Battle Lust is gained every two seconds and decays at a rate of one point every six seconds. This property can be found on most weapon types.
|
||||
public override AosWeaponAttribute Attribute { get { return AosWeaponAttribute.BattleLust; } }
|
||||
public override int Hue { get { return 0x43FF; } }
|
||||
public override int SpriteW { get { return 150; } }
|
||||
public override int SpriteH { get { return 120; } }
|
||||
}
|
||||
|
||||
public class HitCurseProperty : WeaponAttr
|
||||
{
|
||||
public override Catalog Catalog { get { return Catalog.HitEffects; } }
|
||||
public override int LabelNumber { get { return 1154673; } } // Hit Curse
|
||||
public override int Description { get { return 1152438; } } // This property provides a chance to curse the target. The curse effect is similar to the magery third circle spell curse. This effect can only fire once every 30 seconds. This property can be found on all weapons.
|
||||
public override AosWeaponAttribute Attribute { get { return AosWeaponAttribute.HitCurse; } }
|
||||
public override int Hue { get { return 0x43FF; } }
|
||||
public override int SpriteW { get { return 60; } }
|
||||
public override int SpriteH { get { return 180; } }
|
||||
}
|
||||
|
||||
public class HitFatigueProperty : WeaponAttr
|
||||
{
|
||||
public override Catalog Catalog { get { return Catalog.HitEffects; } }
|
||||
public override int LabelNumber { get { return 1154668; } } // Hit Fatigue
|
||||
public override int Description { get { return 1152437; } } // This property provides a chance to reduce the target’s current stamina by 20% of the damage inflicted by the attack. This property can be found on all weapons.
|
||||
public override AosWeaponAttribute Attribute { get { return AosWeaponAttribute.HitFatigue; } }
|
||||
public override int Hue { get { return 0x43FF; } }
|
||||
public override int SpriteW { get { return 240; } }
|
||||
public override int SpriteH { get { return 180; } }
|
||||
}
|
||||
|
||||
public class HitManaDrainProperty : WeaponAttr
|
||||
{
|
||||
public override Catalog Catalog { get { return Catalog.HitEffects; } }
|
||||
public override int LabelNumber { get { return 1154669; } } // Hit Mana Drain
|
||||
public override int Description { get { return 1152436; } } // This property provides a chance to reduce the target’s current mana by 20% of the damage inflicted by the attack. This property can be found on all weapons.
|
||||
public override AosWeaponAttribute Attribute { get { return AosWeaponAttribute.HitManaDrain; } }
|
||||
public override int Hue { get { return 0x43FF; } }
|
||||
public override int SpriteW { get { return 210; } }
|
||||
public override int SpriteH { get { return 180; } }
|
||||
}
|
||||
|
||||
public class SplinteringWeaponProperty : WeaponAttr
|
||||
{
|
||||
public override Catalog Catalog { get { return Catalog.HitEffects; } }
|
||||
public override int LabelNumber { get { return 1154670; } } // Splintering Weapon
|
||||
public override int Description { get { return 1152396; } } // This property provides a chance to apply a bleed effect and a four second duration forced walk to the target. Each application of the splintering weapons reduces the durability of the weapon. This property can be found on melee weapons.
|
||||
public override AosWeaponAttribute Attribute { get { return AosWeaponAttribute.SplinteringWeapon; } }
|
||||
public override int Hue { get { return 0x43FF; } }
|
||||
public override int SpriteW { get { return 60; } }
|
||||
public override int SpriteH { get { return 120; } }
|
||||
}
|
||||
|
||||
public class WeaponReactiveParalyzeProperty : WeaponAttr
|
||||
{
|
||||
public override Catalog Catalog { get { return Catalog.Combat1; } }
|
||||
public override bool IsBoolen { get { return true; } }
|
||||
public override int LabelNumber { get { return 1154660; } } // Reactive Paralyze
|
||||
public override int Description { get { return 1152400; } } // This property provides a chance to cast a paralyze spell on an opponent. The paralyze effect is similar to the magery fifth circle spell paralyze. When the wielder effectively parries an attacker’s blow there is a chance that the attacker will be affected by the paralyze effect. This property can be found on two handed weapons and shields.
|
||||
public override AosWeaponAttribute Attribute { get { return AosWeaponAttribute.ReactiveParalyze; } }
|
||||
public override int Hue { get { return 0x5E5D; } }
|
||||
public override int SpriteW { get { return 270; } }
|
||||
public override int SpriteH { get { return 120; } }
|
||||
}
|
||||
|
||||
public abstract class ElementalDamageAttr : ValuedProperty
|
||||
{
|
||||
public override Catalog Catalog { get { return Catalog.Combat2; } }
|
||||
public override bool AlwaysVisible { get { return true; } }
|
||||
public abstract AosElementAttribute Element { get; }
|
||||
public override int Hue { get { return 0x5E5D; } }
|
||||
|
||||
public double GetPropertyValue(Item item)
|
||||
{
|
||||
return item is BaseWeapon ? GetElementAttributeValue((BaseWeapon)item, Element) : 0;
|
||||
}
|
||||
|
||||
public override bool Matches(Item item)
|
||||
{
|
||||
Value = GetPropertyValue(item);
|
||||
|
||||
if (Value != 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool Matches(List<Item> items)
|
||||
{
|
||||
double total = 0;
|
||||
|
||||
items.ForEach(x => total += GetPropertyValue(x));
|
||||
|
||||
Value = total;
|
||||
|
||||
if (Value != 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private static int GetElementAttributeValue(BaseWeapon weapon, AosElementAttribute element)
|
||||
{
|
||||
weapon.GetDamageTypes(null, out int phys, out int fire, out int cold, out int pois, out int nrgy, out int chaos, out int direct);
|
||||
|
||||
switch (element)
|
||||
{
|
||||
case AosElementAttribute.Physical:
|
||||
return phys;
|
||||
case AosElementAttribute.Fire:
|
||||
return fire;
|
||||
case AosElementAttribute.Cold:
|
||||
return cold;
|
||||
case AosElementAttribute.Poison:
|
||||
return pois;
|
||||
case AosElementAttribute.Energy:
|
||||
return nrgy;
|
||||
case AosElementAttribute.Chaos:
|
||||
return chaos;
|
||||
case AosElementAttribute.Direct:
|
||||
return direct;
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
public class PhysicalDamageProperty : ElementalDamageAttr
|
||||
{
|
||||
public override int LabelNumber { get { return 1151800; } } // Physical Damage
|
||||
public override int Description { get { return 1152461; } } // This property indicates that a percentage of the damage inflicted by the weapon (or spell) will be physical damage. Physical damage is applied against an opponent’s physical resistance.
|
||||
public override AosElementAttribute Element { get { return AosElementAttribute.Physical; } }
|
||||
public override int SpriteW { get { return 270; } }
|
||||
public override int SpriteH { get { return 210; } }
|
||||
}
|
||||
|
||||
public class ColdDamageProperty : ElementalDamageAttr
|
||||
{
|
||||
public override int LabelNumber { get { return 1151802; } } // Cold Damage
|
||||
public override int Description { get { return 1152462; } } // This property indicates that a percentage of the damage inflicted by the weapon (or spell) will be cold damage. Cold damage is applied against an opponent’s cold resistance.
|
||||
public override AosElementAttribute Element { get { return AosElementAttribute.Cold; } }
|
||||
public override int SpriteW { get { return 210; } }
|
||||
public override int SpriteH { get { return 210; } }
|
||||
}
|
||||
|
||||
public class FireDamageProperty : ElementalDamageAttr
|
||||
{
|
||||
public override int LabelNumber { get { return 1151801; } } // Fire Damage
|
||||
public override int Description { get { return 1152472; } } // This property indicates that a percentage of the damage inflicted by the weapon (or spell) will be fire damage. Fire damage is applied against an opponent’s fire resistance.
|
||||
public override AosElementAttribute Element { get { return AosElementAttribute.Fire; } }
|
||||
public override int SpriteW { get { return 180; } }
|
||||
public override int SpriteH { get { return 210; } }
|
||||
}
|
||||
|
||||
public class PoisonDamageProperty : ElementalDamageAttr
|
||||
{
|
||||
public override int LabelNumber { get { return 1151803; } } // Poison Damage
|
||||
public override int Description { get { return 1152473; } } // This property indicates that a percentage of the damage inflicted by the weapon (or spell) will be poison damage. Poison damage is applied against an opponent’s poison resistance.
|
||||
public override AosElementAttribute Element { get { return AosElementAttribute.Poison; } }
|
||||
public override int SpriteW { get { return 0; } }
|
||||
public override int SpriteH { get { return 240; } }
|
||||
}
|
||||
|
||||
public class EnergyDamageProperty : ElementalDamageAttr
|
||||
{
|
||||
public override int LabelNumber { get { return 1151804; } } // Energy Damage
|
||||
public override int Description { get { return 1152474; } } // This property indicates that a percentage of the damage inflicted by the weapon (or spell) will be energy damage. Energy damage is applied against an opponent’s energy resistance.
|
||||
public override AosElementAttribute Element { get { return AosElementAttribute.Energy; } }
|
||||
public override int SpriteW { get { return 240; } }
|
||||
public override int SpriteH { get { return 210; } }
|
||||
}
|
||||
|
||||
public class ChaosDamageProperty : ElementalDamageAttr
|
||||
{
|
||||
public override int LabelNumber { get { return 1151805; } } // Chaos Damage
|
||||
public override int Description { get { return 1152475; } } // This property indicates that a percentage of the damage inflicted by the weapon (or spell) will be of a random type of damage (physical, fire, cold, poison or energy).
|
||||
public override AosElementAttribute Element { get { return AosElementAttribute.Chaos; } }
|
||||
public override int SpriteW { get { return 30; } }
|
||||
public override int SpriteH { get { return 240; } }
|
||||
}
|
||||
|
||||
public class VelocityProperty : ValuedProperty
|
||||
{
|
||||
public override Catalog Catalog { get { return Catalog.HitEffects; } }
|
||||
public override int LabelNumber { get { return 1080416; } } // Velocity
|
||||
public override int Description { get { return 1152392; } } // This property provides a chance for a ranged weapon to inflict additional damage. The additional damage is increased by 3 points for each tile that the attacker is away from the target up to a maximum of 30 points of damage. The damage inflicted is physical damage that can be lessened by a targets physical resistance. This property can only be found on ranged weapons.
|
||||
public override int Hue { get { return 0x5E5D; } }
|
||||
public override int SpriteW { get { return 90; } }
|
||||
public override int SpriteH { get { return 120; } }
|
||||
|
||||
public double GetPropertyValue(Item item)
|
||||
{
|
||||
return item is BaseRanged ? ((BaseRanged)item).Velocity : 0;
|
||||
}
|
||||
|
||||
public override bool Matches(Item item)
|
||||
{
|
||||
Value = GetPropertyValue(item);
|
||||
|
||||
if (Value != 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool Matches(List<Item> items)
|
||||
{
|
||||
double total = 0;
|
||||
|
||||
items.ForEach(x => total += GetPropertyValue(x));
|
||||
|
||||
Value = total;
|
||||
|
||||
if (Value != 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user