diff --git a/POEApi.Model/GearType/GearTypeFactory.cs b/POEApi.Model/GearType/GearTypeFactory.cs index bea36f51..e9470309 100644 --- a/POEApi.Model/GearType/GearTypeFactory.cs +++ b/POEApi.Model/GearType/GearTypeFactory.cs @@ -8,8 +8,8 @@ internal class GearTypeFactory { { new HelmetRunner() }, { new RingRunner() }, - { new AmuletRunner() }, { new TalismanRunner() }, + { new AmuletRunner() }, { new BeltRunner() }, { new FlaskRunner() }, { new GloveRunner() }, diff --git a/POEApi.Model/GearType/GearTypeRunner.cs b/POEApi.Model/GearType/GearTypeRunner.cs index 454671b7..5141688f 100644 --- a/POEApi.Model/GearType/GearTypeRunner.cs +++ b/POEApi.Model/GearType/GearTypeRunner.cs @@ -125,6 +125,7 @@ public HelmetRunner() : base(GearType.Helmet, Settings.GearBaseTypes[GearType.Helmet]) { _generalTypes.AddRange(new List() { "Helmet", "Circlet", "Cap", "Mask", "Chain Coif", "Casque", "Hood", "Ringmail Coif", "Chainmail Coif", "Ring Coif", "Crown", "Burgonet", "Bascinet", "Pelt" }); + _incompatibleTypes.Add("Her Mask"); } } @@ -200,7 +201,7 @@ public GloveRunner() : base(GearType.Gloves, Settings.GearBaseTypes[GearType.Gloves]) { _generalTypes.Add("Glove"); - _generalTypes.Add("Mitts"); + _generalTypes.Add(" Mitts"); _generalTypes.Add("Gauntlets"); } } @@ -302,6 +303,7 @@ public SwordRunner() { _generalTypes.AddRange(new List() { "Sword", "sword", "Sabre", "Dusk Blade", "Cutlass", "Baselard", "Gladius", "Variscite Blade", "Vaal Blade", "Midnight Blade", "Corroded Blade", "Highland Blade", "Ezomyte Blade", "Rusted Spike", "Rapier", "Foil", "Pecoraro", "Estoc", "Twilight Blade", "Lithe Blade" }); + _incompatibleTypes.Add("The Sword King's Salute"); } } diff --git a/Procurement/Procurement.csproj b/Procurement/Procurement.csproj index 8c3ce64c..ccd2d1b4 100644 --- a/Procurement/Procurement.csproj +++ b/Procurement/Procurement.csproj @@ -181,7 +181,7 @@ - + @@ -209,6 +209,7 @@ + @@ -236,6 +237,8 @@ + + @@ -266,6 +269,7 @@ + diff --git a/Procurement/ViewModel/Filters/ForumExport/AccurayFilter.cs b/Procurement/ViewModel/Filters/ForumExport/AccuracyFilter.cs similarity index 81% rename from Procurement/ViewModel/Filters/ForumExport/AccurayFilter.cs rename to Procurement/ViewModel/Filters/ForumExport/AccuracyFilter.cs index b8fa7391..152d88d7 100644 --- a/Procurement/ViewModel/Filters/ForumExport/AccurayFilter.cs +++ b/Procurement/ViewModel/Filters/ForumExport/AccuracyFilter.cs @@ -5,14 +5,14 @@ namespace Procurement.ViewModel.Filters.ForumExport { - internal class AccurayFilter : StatFilter + internal class AccuracyFilter : StatFilter { public override FilterGroup Group { get { return FilterGroup.Attacks; } } - public AccurayFilter() + public AccuracyFilter() : base("Increased Accuracy", "Increased Accuracy", "Accuracy") { } } diff --git a/Procurement/ViewModel/Filters/ForumExport/ArmourFilter.cs b/Procurement/ViewModel/Filters/ForumExport/ArmourFilter.cs new file mode 100644 index 00000000..9c3dd8eb --- /dev/null +++ b/Procurement/ViewModel/Filters/ForumExport/ArmourFilter.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Procurement.ViewModel.Filters.ForumExport +{ + public class ArmourFilter : OrStatFilter + { + public ArmourFilter() + : base("Armour", "Items with additional or increased Armour", "to Armour", "increased Armour", "increased Global Armour", "increased Global Defences") + { } + + public override FilterGroup Group + { + get { return FilterGroup.Default; } + } + } +} diff --git a/Procurement/ViewModel/Filters/ForumExport/AttackSpeed.cs b/Procurement/ViewModel/Filters/ForumExport/AttackSpeed.cs index 4510ada6..b4636437 100644 --- a/Procurement/ViewModel/Filters/ForumExport/AttackSpeed.cs +++ b/Procurement/ViewModel/Filters/ForumExport/AttackSpeed.cs @@ -1,6 +1,6 @@ namespace Procurement.ViewModel.Filters.ForumExport { - internal class AttackSpeed : StatFilter + internal class AttackSpeed : OrStatFilter { public override FilterGroup Group { @@ -8,7 +8,7 @@ public override FilterGroup Group } public AttackSpeed() - : base("Increased Attack Speed", "Increased Attack Speed", "Increased Attack Speed") + : base("Increased Attack Speed", "Increased Attack Speed", "increased Attack Speed", "increased Attack and Cast Speed", "increased Attack, Cast and Movement Speed") { } } } diff --git a/Procurement/ViewModel/Filters/ForumExport/CastSpeed.cs b/Procurement/ViewModel/Filters/ForumExport/CastSpeed.cs index bd734747..7a426779 100644 --- a/Procurement/ViewModel/Filters/ForumExport/CastSpeed.cs +++ b/Procurement/ViewModel/Filters/ForumExport/CastSpeed.cs @@ -1,6 +1,6 @@ namespace Procurement.ViewModel.Filters.ForumExport { - internal class CastSpeed : StatFilter + internal class CastSpeed : OrStatFilter { public override FilterGroup Group { @@ -8,7 +8,7 @@ public override FilterGroup Group } public CastSpeed() - : base("Increased Cast Speed", "Increased Cast Speed", "Increased Cast Speed") + : base("Increased Cast Speed", "Increased Cast Speed", "increased Cast Speed", "increased Attack and Cast Speed", "increased Attack, Cast and Movement Speed") { } } } diff --git a/Procurement/ViewModel/Filters/ForumExport/ChaosResistance.cs b/Procurement/ViewModel/Filters/ForumExport/ChaosResistance.cs index c97bfe30..d18f4ed5 100644 --- a/Procurement/ViewModel/Filters/ForumExport/ChaosResistance.cs +++ b/Procurement/ViewModel/Filters/ForumExport/ChaosResistance.cs @@ -1,6 +1,6 @@ namespace Procurement.ViewModel.Filters { - internal class ChaosResistance : StatFilter + internal class ChaosResistance : OrStatFilter { public override FilterGroup Group { @@ -8,7 +8,7 @@ public override FilterGroup Group } public ChaosResistance() - : base("Chaos Resistance", "Chaos Resistance", "to Chaos Resistance") + : base("Chaos Resistance", "Chaos Resistance", "to Chaos Resistance", "to Fire and Chaos Resistances", "to Cold and Chaos Resistances", "to Lightning and Chaos Resistances") { } } } diff --git a/Procurement/ViewModel/Filters/ForumExport/CharacterAttributeFilters.cs b/Procurement/ViewModel/Filters/ForumExport/CharacterAttributeFilters.cs index b2b0ef78..98528af8 100644 --- a/Procurement/ViewModel/Filters/ForumExport/CharacterAttributeFilters.cs +++ b/Procurement/ViewModel/Filters/ForumExport/CharacterAttributeFilters.cs @@ -1,6 +1,6 @@ namespace Procurement.ViewModel.Filters.ForumExport { - class StrengthFilter : StatFilter + class StrengthFilter : OrStatFilter { public override FilterGroup Group { @@ -8,12 +8,12 @@ public override FilterGroup Group } public StrengthFilter() - : base("Increased Strength", "Strength", "Strength") + : base("Increased Strength", "Increased Strength", "to Strength", "increased Strength", "to all Attributes", "increased Attributes") { } } - class IntelligenceFilter : StatFilter + class IntelligenceFilter : OrStatFilter { public override FilterGroup Group { @@ -21,11 +21,11 @@ public override FilterGroup Group } public IntelligenceFilter() - : base("Increased Intelligence", "Intelligence", "Intelligence") + : base("Increased Intelligence", "Increased Intelligence", "to Intelligence", "to Strength and Intelligence", "to Dexterity and Intelligence", "increased Intelligence", "to all Attributes", "increased Attributes") { } } - class DexterityFilter : StatFilter + class DexterityFilter : OrStatFilter { public override FilterGroup Group { @@ -33,7 +33,7 @@ public override FilterGroup Group } public DexterityFilter() - : base("Increased Dexterity", "Increased Dexterity", "Dexterity") + : base("Increased Dexterity", "Increased Dexterity", "to Dexterity", "to Strength and Dexterity", "increased Dexterity", "to all Attributes", "increased Attributes") { } } } diff --git a/Procurement/ViewModel/Filters/ForumExport/ColdResistance.cs b/Procurement/ViewModel/Filters/ForumExport/ColdResistance.cs index 1ab8b7ac..950ca7f0 100644 --- a/Procurement/ViewModel/Filters/ForumExport/ColdResistance.cs +++ b/Procurement/ViewModel/Filters/ForumExport/ColdResistance.cs @@ -8,7 +8,7 @@ public override FilterGroup Group } public ColdResistance() - : base("Cold Resistance", "Cold Resistance", "to Cold Resistance", "to Fire and Cold Resistances", "to Cold and Lightning Resistances") + : base("Cold Resistance", "Cold Resistance", "to Cold Resistance", "to Fire and Cold Resistances", "to Cold and Lightning Resistances", "to Cold and Chaos Resistances", "to all Elemental Resistances") { } } } diff --git a/Procurement/ViewModel/Filters/ForumExport/CritChanceFilter.cs b/Procurement/ViewModel/Filters/ForumExport/CritChanceFilter.cs index 61432a34..e7c8f0f9 100644 --- a/Procurement/ViewModel/Filters/ForumExport/CritChanceFilter.cs +++ b/Procurement/ViewModel/Filters/ForumExport/CritChanceFilter.cs @@ -8,7 +8,7 @@ namespace Procurement.ViewModel.Filters.ForumExport public class CritChanceFilter : ExplicitModBase { public CritChanceFilter() - : base("increased Critical Strike Chance") + : base("Critical Strike Chance") { } public override bool CanFormCategory @@ -18,7 +18,7 @@ public override bool CanFormCategory public override string Keyword { - get { return "Crit Chance"; } + get { return "Critical Strike Chance"; } } public override string Help diff --git a/Procurement/ViewModel/Filters/ForumExport/CritMultiplierFilter.cs b/Procurement/ViewModel/Filters/ForumExport/CritMultiplierFilter.cs new file mode 100644 index 00000000..bcc6f20e --- /dev/null +++ b/Procurement/ViewModel/Filters/ForumExport/CritMultiplierFilter.cs @@ -0,0 +1,34 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Procurement.ViewModel.Filters.ForumExport +{ + public class CritMultiplierFilter : ExplicitModBase + { + public CritMultiplierFilter() + : base("Critical Strike Multiplier") + { } + + public override bool CanFormCategory + { + get { return false; } + } + + public override string Keyword + { + get { return "Critical Strike Multiplier"; } + } + + public override string Help + { + get { return "Items with additional Critical Strike Multiplier"; } + } + + public override FilterGroup Group + { + get { return FilterGroup.Crit; } + } + } +} diff --git a/Procurement/ViewModel/Filters/ForumExport/DamageChaos.cs b/Procurement/ViewModel/Filters/ForumExport/DamageChaos.cs index 8d1b113f..5171c5af 100644 --- a/Procurement/ViewModel/Filters/ForumExport/DamageChaos.cs +++ b/Procurement/ViewModel/Filters/ForumExport/DamageChaos.cs @@ -1,6 +1,6 @@ namespace Procurement.ViewModel.Filters.ForumExport { - internal class DamageChaos : StatFilter + internal class DamageChaos : OrStatFilter { public override FilterGroup Group { @@ -8,7 +8,7 @@ public override FilterGroup Group } public DamageChaos() - : base("Adds Chaos Damage", "Adds Chaos Damage", "Adds \\d+ to \\d+ Chaos Damage") + : base("Adds Chaos Damage", "Adds Chaos Damage", "Adds \\d+ to \\d+ Chaos Damage", "as Extra Chaos Damage") { } } } diff --git a/Procurement/ViewModel/Filters/ForumExport/DamageCold.cs b/Procurement/ViewModel/Filters/ForumExport/DamageCold.cs index 64f2a9aa..eda544b1 100644 --- a/Procurement/ViewModel/Filters/ForumExport/DamageCold.cs +++ b/Procurement/ViewModel/Filters/ForumExport/DamageCold.cs @@ -1,6 +1,6 @@ namespace Procurement.ViewModel.Filters.ForumExport { - internal class DamageCold : StatFilter + internal class DamageCold : OrStatFilter { public override FilterGroup Group { @@ -8,7 +8,7 @@ public override FilterGroup Group } public DamageCold() - : base("Adds Cold Damage", "Adds Cold Damage", "Adds \\d+ to \\d+ Cold Damage") + : base("Adds Cold Damage", "Adds Cold Damage", "Adds \\d+ to \\d+ Cold Damage", "as Extra Cold Damage", "as Extra Damage of each Element", "as Extra Damage of a random Element") { } } } diff --git a/Procurement/ViewModel/Filters/ForumExport/DamageFire.cs b/Procurement/ViewModel/Filters/ForumExport/DamageFire.cs index 8888ba31..4271cd2b 100644 --- a/Procurement/ViewModel/Filters/ForumExport/DamageFire.cs +++ b/Procurement/ViewModel/Filters/ForumExport/DamageFire.cs @@ -1,6 +1,6 @@ namespace Procurement.ViewModel.Filters.ForumExport { - internal class DamageFire : StatFilter + internal class DamageFire : OrStatFilter { public override FilterGroup Group { @@ -8,7 +8,7 @@ public override FilterGroup Group } public DamageFire() - : base("Adds Fire Damage", "Adds Fire Damage", "Adds \\d+ to \\d+ Fire Damage") + : base("Adds Fire Damage", "Adds Fire Damage", "Adds \\d+ to \\d+ Fire Damage", "as Extra Fire Damage", "as Extra Damage of each Element", "as Extra Damage of a random Element") { } } } diff --git a/Procurement/ViewModel/Filters/ForumExport/DamageLightning.cs b/Procurement/ViewModel/Filters/ForumExport/DamageLightning.cs index 30f97fc4..0f413643 100644 --- a/Procurement/ViewModel/Filters/ForumExport/DamageLightning.cs +++ b/Procurement/ViewModel/Filters/ForumExport/DamageLightning.cs @@ -1,6 +1,6 @@ namespace Procurement.ViewModel.Filters.ForumExport { - internal class DamageLightning: StatFilter + internal class DamageLightning: OrStatFilter { public override FilterGroup Group { @@ -8,7 +8,7 @@ public override FilterGroup Group } public DamageLightning() - : base("Adds Lightning Damage", "Adds Lightning Damage", "Adds \\d+ to \\d+ Lightning Damage") + : base("Adds Lightning Damage", "Adds Lightning Damage", "Adds \\d+ to \\d+ Lightning Damage", "as Extra Lightning Damage", "as Extra Damage of each Element", "as Extra Damage of a random Element") { } } } diff --git a/Procurement/ViewModel/Filters/ForumExport/DamageTriple.cs b/Procurement/ViewModel/Filters/ForumExport/DamageTriple.cs index e72acb8d..7c9fe888 100644 --- a/Procurement/ViewModel/Filters/ForumExport/DamageTriple.cs +++ b/Procurement/ViewModel/Filters/ForumExport/DamageTriple.cs @@ -6,7 +6,7 @@ namespace Procurement.ViewModel.Filters.ForumExport { internal class DamageTriple : IFilter { - private List resistances; + private List resistances; public FilterGroup Group { @@ -15,7 +15,7 @@ public FilterGroup Group public DamageTriple() { - resistances = new List(); + resistances = new List(); resistances.Add(new DamageCold()); resistances.Add(new DamageFire()); resistances.Add(new DamageLightning()); diff --git a/Procurement/ViewModel/Filters/ForumExport/EvasionFilter.cs b/Procurement/ViewModel/Filters/ForumExport/EvasionFilter.cs new file mode 100644 index 00000000..3db1d97d --- /dev/null +++ b/Procurement/ViewModel/Filters/ForumExport/EvasionFilter.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Procurement.ViewModel.Filters.ForumExport +{ + public class EvasionFilter : OrStatFilter + { + public EvasionFilter() + : base("Evasion", "Items with additional or increased Evasion", "Evasion Rating", "increased Armour and Evasion", "increased Evasion and Energy Shield", "increased Armour, Evasion and Energy Shield", "increased Global Defences") + { } + + public override FilterGroup Group + { + get { return FilterGroup.Default; } + } + } +} diff --git a/Procurement/ViewModel/Filters/ForumExport/ExplicitModBase.cs b/Procurement/ViewModel/Filters/ForumExport/ExplicitModBase.cs index 11e0ed24..189f6112 100644 --- a/Procurement/ViewModel/Filters/ForumExport/ExplicitModBase.cs +++ b/Procurement/ViewModel/Filters/ForumExport/ExplicitModBase.cs @@ -14,12 +14,29 @@ public ExplicitModBase(string keyword) public bool Applicable(Item item) { - if (item.Explicitmods == null || !(item is Gear)) + Gear gear = item as Gear; + if (gear == null) return false; - foreach (var mod in item.Explicitmods) - if (mod.Contains(keyword)) - return true; + if (gear.Explicitmods != null) + foreach (var mod in gear.Explicitmods) + if (mod.Contains(keyword)) + return true; + + if (gear.FracturedMods != null) + foreach (var mod in gear.FracturedMods) + if (mod.Contains(keyword)) + return true; + + if (gear.CraftedMods != null) + foreach (var mod in gear.CraftedMods) + if (mod.Contains(keyword)) + return true; + + if (gear.EnchantMods != null) + foreach (var mod in gear.EnchantMods) + if (mod.Contains(keyword)) + return true; return false; } diff --git a/Procurement/ViewModel/Filters/ForumExport/FireResistance.cs b/Procurement/ViewModel/Filters/ForumExport/FireResistance.cs index 1c58014a..e5ec1172 100644 --- a/Procurement/ViewModel/Filters/ForumExport/FireResistance.cs +++ b/Procurement/ViewModel/Filters/ForumExport/FireResistance.cs @@ -8,7 +8,7 @@ public override FilterGroup Group } public FireResistance() - : base("Fire Resistance", "Fire Resistance", "to Fire Resistance", "to Fire and Lightning Resistances", "to Fire and Cold Resistances") + : base("Fire Resistance", "Fire Resistance", "to Fire Resistance", "to Fire and Lightning Resistances", "to Fire and Cold Resistances", "to Fire and Chaos Resistances", "to all Elemental Resistances") { } } } diff --git a/Procurement/ViewModel/Filters/ForumExport/FullBestiaryOrbFilter.cs b/Procurement/ViewModel/Filters/ForumExport/FullBestiaryOrbFilter.cs index aa2677f2..5a92c752 100644 --- a/Procurement/ViewModel/Filters/ForumExport/FullBestiaryOrbFilter.cs +++ b/Procurement/ViewModel/Filters/ForumExport/FullBestiaryOrbFilter.cs @@ -16,7 +16,7 @@ public string Keyword { get { - return "Full Bestiary Orb"; + return "Captured Beasts"; } } diff --git a/Procurement/ViewModel/Filters/ForumExport/GearSearchFilters.cs b/Procurement/ViewModel/Filters/ForumExport/GearSearchFilters.cs index cc1f04c6..bfce61d9 100644 --- a/Procurement/ViewModel/Filters/ForumExport/GearSearchFilters.cs +++ b/Procurement/ViewModel/Filters/ForumExport/GearSearchFilters.cs @@ -14,6 +14,15 @@ class AmuletFilter : GearTypeFilter public AmuletFilter() : base(GearType.Amulet, "Amulets") { } + public override bool Applicable(Item item) + { + Gear gear = item as Gear; + + if (gear != null) + return gear.GearType == GearType.Amulet || gear.GearType == GearType.Talisman; + + return false; + } } class TalismanFilter : GearTypeFilter diff --git a/Procurement/ViewModel/Filters/ForumExport/GearTypeFilter.cs b/Procurement/ViewModel/Filters/ForumExport/GearTypeFilter.cs index 37763b81..ce63323a 100644 --- a/Procurement/ViewModel/Filters/ForumExport/GearTypeFilter.cs +++ b/Procurement/ViewModel/Filters/ForumExport/GearTypeFilter.cs @@ -21,7 +21,7 @@ public GearTypeFilter(GearType gearType, string keyword) public string Keyword { get; set; } public string Help { get { return "Returns All " + gearType.ToString() + " gear"; } } - public bool Applicable(Item item) + public virtual bool Applicable(Item item) { Gear gear = item as Gear; if (gear != null) diff --git a/Procurement/ViewModel/Filters/ForumExport/GlobalCritChanceFilter.cs b/Procurement/ViewModel/Filters/ForumExport/GlobalCritChanceFilter.cs index 9f5f8fcb..ae94735b 100644 --- a/Procurement/ViewModel/Filters/ForumExport/GlobalCritChanceFilter.cs +++ b/Procurement/ViewModel/Filters/ForumExport/GlobalCritChanceFilter.cs @@ -8,7 +8,7 @@ namespace Procurement.ViewModel.Filters.ForumExport public class GlobalCritChanceFilter : ExplicitModBase { public GlobalCritChanceFilter() - : base("increased Global Critical Strike Chance") + : base("Global Critical Strike Chance") { } public override bool CanFormCategory @@ -18,7 +18,7 @@ public override bool CanFormCategory public override string Keyword { - get { return "Global Crit Chance"; } + get { return "Global Critical Strike Chance"; } } public override string Help diff --git a/Procurement/ViewModel/Filters/ForumExport/GlobalCritMultiplierFilter.cs b/Procurement/ViewModel/Filters/ForumExport/GlobalCritMultiplierFilter.cs index eeee08b8..a1dcda26 100644 --- a/Procurement/ViewModel/Filters/ForumExport/GlobalCritMultiplierFilter.cs +++ b/Procurement/ViewModel/Filters/ForumExport/GlobalCritMultiplierFilter.cs @@ -8,7 +8,7 @@ namespace Procurement.ViewModel.Filters.ForumExport public class GlobalCritMultiplierFilter : ExplicitModBase { public GlobalCritMultiplierFilter() - : base("to Global Critical Strike Multiplier") + : base("Global Critical Strike Multiplier") { } public override bool CanFormCategory @@ -18,7 +18,7 @@ public override bool CanFormCategory public override string Keyword { - get { return "Global Crit Multiplier"; } + get { return "Global Critical Strike Multiplier"; } } public override string Help diff --git a/Procurement/ViewModel/Filters/ForumExport/IncreasedDamageFilter.cs b/Procurement/ViewModel/Filters/ForumExport/IncreasedDamageFilter.cs index 03705192..5adab034 100644 --- a/Procurement/ViewModel/Filters/ForumExport/IncreasedDamageFilter.cs +++ b/Procurement/ViewModel/Filters/ForumExport/IncreasedDamageFilter.cs @@ -12,24 +12,31 @@ public override FilterGroup Group } } + internal class IncreasedDamageFilterChaos : IncreasedDamageFilter + { + public IncreasedDamageFilterChaos() + : base("Increased Chaos Damage", "Increased Chaos Damage", "increased Chaos Damage") + { } + } + internal class IncreasedDamageFilterCold : IncreasedDamageFilter { public IncreasedDamageFilterCold() - : base("Increased Cold Damage", "Increased Cold Damage", "Increased Cold Damage") + : base("Increased Cold Damage", "Increased Cold Damage", "increased Cold Damage") { } } internal class IncreasedDamageFilterFire : IncreasedDamageFilter { public IncreasedDamageFilterFire() - : base("Increased Fire Damage", "Increased Fire Damage", "Increased Fire Damage") + : base("Increased Fire Damage", "Increased Fire Damage", "increased Fire Damage") { } } internal class IncreasedDamageFilterLightning : IncreasedDamageFilter { public IncreasedDamageFilterLightning() - : base("Increased Lightning Damage", "Increased Lightning Damage", "Increased Lightning Damage") + : base("Increased Lightning Damage", "Increased Lightning Damage", "increased Lightning Damage") { } } diff --git a/Procurement/ViewModel/Filters/ForumExport/IncreasedPhysicalDamageFilter.cs b/Procurement/ViewModel/Filters/ForumExport/IncreasedPhysicalDamageFilter.cs index c4ef3d04..456595b8 100644 --- a/Procurement/ViewModel/Filters/ForumExport/IncreasedPhysicalDamageFilter.cs +++ b/Procurement/ViewModel/Filters/ForumExport/IncreasedPhysicalDamageFilter.cs @@ -6,30 +6,18 @@ namespace Procurement.ViewModel.Filters { - public class IncreasedPhysicalDamageFilter : ExplicitModBase + public class IncreasedPhysicalDamageFilter : OrStatFilter { - public IncreasedPhysicalDamageFilter() - : base("increased Physical Damage") - { } - public override bool CanFormCategory { get { return false; } } - - public override string Keyword - { - get { return "Increased Physical Damage"; } - } - - public override string Help - { - get { return "Items with Increased Physical Damage"; } - } - public override FilterGroup Group { get { return FilterGroup.Damage; } } + public IncreasedPhysicalDamageFilter() + : base("Increased Physical Damage", "Items with Increased Physical Damage", "increased Physical Damage", "increased Global Physical Damage") + { } } } diff --git a/Procurement/ViewModel/Filters/ForumExport/ItemQuantityFilter.cs b/Procurement/ViewModel/Filters/ForumExport/ItemQuantityFilter.cs index 19b0acb5..f4b8bb12 100644 --- a/Procurement/ViewModel/Filters/ForumExport/ItemQuantityFilter.cs +++ b/Procurement/ViewModel/Filters/ForumExport/ItemQuantityFilter.cs @@ -5,7 +5,7 @@ namespace Procurement.ViewModel.Filters { - public class ItemQuantityFilter : StatFilter + public class ItemQuantityFilter : OrStatFilter { public override FilterGroup Group { @@ -13,7 +13,7 @@ public override FilterGroup Group } public ItemQuantityFilter() - : base("Item Quantity", "Item with the Item Quantity stat", "INCREASED QUANTITY") + : base("Item Quantity", "Items with the Item Quantity stat", "increased Quantity", "increased Item Quantity") { } } } diff --git a/Procurement/ViewModel/Filters/ForumExport/ItemRarityFilter.cs b/Procurement/ViewModel/Filters/ForumExport/ItemRarityFilter.cs index 91d876c2..19dbfbd8 100644 --- a/Procurement/ViewModel/Filters/ForumExport/ItemRarityFilter.cs +++ b/Procurement/ViewModel/Filters/ForumExport/ItemRarityFilter.cs @@ -1,6 +1,6 @@ namespace Procurement.ViewModel.Filters { - internal class ItemRarityFilter : StatFilter + internal class ItemRarityFilter : OrStatFilter { public override FilterGroup Group { @@ -8,7 +8,7 @@ public override FilterGroup Group } public ItemRarityFilter() - : base("Item Rarity", "Item with the Item Rarity stat", "INCREASED RARITY") + : base("Item Rarity", "Items with the Item Rarity stat", "increased Rarity", "increased Item Rarity") { } } } diff --git a/Procurement/ViewModel/Filters/ForumExport/LifeRegenFilter.cs b/Procurement/ViewModel/Filters/ForumExport/LifeRegenFilter.cs index a264a1c5..debbbf1f 100644 --- a/Procurement/ViewModel/Filters/ForumExport/LifeRegenFilter.cs +++ b/Procurement/ViewModel/Filters/ForumExport/LifeRegenFilter.cs @@ -1,29 +1,17 @@ namespace Procurement.ViewModel.Filters.ForumExport { - public class LifeRegenFilter : ExplicitModBase + public class LifeRegenFilter : OrStatFilter { - public LifeRegenFilter() - : base("Life Regenerated per second") - { } - public override bool CanFormCategory { get { return false; } } - - public override string Keyword - { - get { return "Life regen"; } - } - - public override string Help - { - get { return "Items with Life Regenerated per second"; } - } - public override FilterGroup Group { get { return FilterGroup.Default; } } + public LifeRegenFilter() + : base("Life regen", "Items with Life Regenerated per second", "Life Regenerated per second", "Life per second") + { } } } diff --git a/Procurement/ViewModel/Filters/ForumExport/LightningResistance.cs b/Procurement/ViewModel/Filters/ForumExport/LightningResistance.cs index eb216f01..923dae67 100644 --- a/Procurement/ViewModel/Filters/ForumExport/LightningResistance.cs +++ b/Procurement/ViewModel/Filters/ForumExport/LightningResistance.cs @@ -8,7 +8,7 @@ public override FilterGroup Group } public LightningResistance() - : base("Lightning Resistance", "Lightning Resistance", "to Lightning Resistance", "to Cold and Lightning Resistances", "to Fire and Lightning Resistances") + : base("Lightning Resistance", "Lightning Resistance", "to Lightning Resistance", "to Cold and Lightning Resistances", "to Fire and Lightning Resistances", "to Lightning and Chaos Resistances", "to all Elemental Resistances") { } } } \ No newline at end of file diff --git a/Procurement/ViewModel/Filters/ForumExport/ManaRegenFilter.cs b/Procurement/ViewModel/Filters/ForumExport/ManaRegenFilter.cs index 982bbacd..0569b12c 100644 --- a/Procurement/ViewModel/Filters/ForumExport/ManaRegenFilter.cs +++ b/Procurement/ViewModel/Filters/ForumExport/ManaRegenFilter.cs @@ -1,28 +1,17 @@ namespace Procurement.ViewModel.Filters.ForumExport { - public class ManaRegenFilter : ExplicitModBase + public class ManaRegenFilter : OrStatFilter { - public ManaRegenFilter() - : base("increased Mana Regeneration Rate") - { } public override bool CanFormCategory { get { return false; } } - - public override string Keyword - { - get { return "Mana regen"; } - } - - public override string Help - { - get { return "Items with increased Mana Regeneration Rate"; } - } - public override FilterGroup Group { get { return FilterGroup.Default; } } + public ManaRegenFilter() + : base("Mana regen", "Items with increased Mana Regeneration Rate", "increased Mana Regeneration Rate", "Mana per second", "Mana Regenerated per second", "as extra Mana Regeneration") + { } } } diff --git a/Procurement/ViewModel/Filters/ForumExport/OrStatFilter.cs b/Procurement/ViewModel/Filters/ForumExport/OrStatFilter.cs index 29f46944..344dbb0d 100644 --- a/Procurement/ViewModel/Filters/ForumExport/OrStatFilter.cs +++ b/Procurement/ViewModel/Filters/ForumExport/OrStatFilter.cs @@ -28,6 +28,15 @@ public bool Applicable(POEApi.Model.Item item) if (gear.Explicitmods != null) all.AddRange(gear.Explicitmods.Select(s => s)); + if (gear.CraftedMods != null) + all.AddRange(gear.CraftedMods.Select(s => s)); + + if (gear.FracturedMods != null) + all.AddRange(gear.FracturedMods.Select(s => s)); + + if (gear.EnchantMods != null) + all.AddRange(gear.EnchantMods.Select(s => s)); + foreach (string stat in all) { Regex result = pool.Find(s => s.IsMatch(stat)); diff --git a/Procurement/ViewModel/Filters/ForumExport/PercentEnergyShieldFilter.cs b/Procurement/ViewModel/Filters/ForumExport/PercentEnergyShieldFilter.cs index c17bec9e..cb9d7118 100644 --- a/Procurement/ViewModel/Filters/ForumExport/PercentEnergyShieldFilter.cs +++ b/Procurement/ViewModel/Filters/ForumExport/PercentEnergyShieldFilter.cs @@ -5,10 +5,10 @@ namespace Procurement.ViewModel.Filters.ForumExport { - public class PercentEnergyShieldFilter : StatFilter + public class PercentEnergyShieldFilter : OrStatFilter { public PercentEnergyShieldFilter() - : base("% Increased Energy Shield", "Items with % increased energy shield", "% increased maximum energy shield") + : base("% Increased Energy Shield", "Items with % increased energy shield", "% increased maximum Energy Shield", "increased Global Defences") { } public override FilterGroup Group diff --git a/Procurement/ViewModel/Filters/ForumExport/ProphecyFilter.cs b/Procurement/ViewModel/Filters/ForumExport/ProphecyFilter.cs index dbbbcd11..0e4c7654 100644 --- a/Procurement/ViewModel/Filters/ForumExport/ProphecyFilter.cs +++ b/Procurement/ViewModel/Filters/ForumExport/ProphecyFilter.cs @@ -1,4 +1,5 @@ using POEApi.Model; +using System.Linq; namespace Procurement.ViewModel.Filters.ForumExport { @@ -6,7 +7,14 @@ public class AbyssJewelFilter : IFilter { public bool Applicable(Item item) { - return item is AbyssJewel; + if (item is AbyssJewel) + return true; + + Gear gear = item as Gear; + if (gear != null && gear.SocketedItems.Any(x => Applicable(x))) + return true; + + return false; } public FilterGroup Group diff --git a/Procurement/ViewModel/Filters/ForumExport/SixWhiteSockets.cs b/Procurement/ViewModel/Filters/ForumExport/SixWhiteSockets.cs new file mode 100644 index 00000000..cc353499 --- /dev/null +++ b/Procurement/ViewModel/Filters/ForumExport/SixWhiteSockets.cs @@ -0,0 +1,39 @@ +using POEApi.Model; +using System; +using System.Linq; + +namespace Procurement.ViewModel.Filters.ForumExport +{ + class SixWhiteSockets : IFilter + { + public bool CanFormCategory + { + get { throw new NotImplementedException(); } + } + + public string Keyword + { + get { return "6 White Sockets"; } + } + + public string Help + { + get { return "Gear with 6 white sockets"; } + } + + public FilterGroup Group + { + get { return FilterGroup.Default; } + } + + public bool Applicable(Item item) + { + var gear = item as Gear; + + if (gear == null) + return false; + + return gear.Sockets.Where(s => s.Attribute.Equals("G", StringComparison.OrdinalIgnoreCase)).Count() == 6; + } + } +} diff --git a/Procurement/ViewModel/Filters/ForumExport/SocketColourFilter.cs b/Procurement/ViewModel/Filters/ForumExport/SocketColourFilter.cs index 48b74522..528d5294 100644 --- a/Procurement/ViewModel/Filters/ForumExport/SocketColourFilter.cs +++ b/Procurement/ViewModel/Filters/ForumExport/SocketColourFilter.cs @@ -50,6 +50,20 @@ public bool Applicable(Item item) } } + class OneAbyssalSocket : SocketColourFilter + { + public OneAbyssalSocket() + : base("A", 1, "At Least 1 Abyssal Socket", "Gear with 1 or more abyssal sockets") + { } + } + + class OneWhiteSocket : SocketColourFilter + { + public OneWhiteSocket() + : base("G", 1, "At Least 1 White Socket", "Gear with 1 or more white sockets") + { } + } + class OneRedSocket : SocketColourFilter { public OneRedSocket() @@ -71,6 +85,20 @@ public OneBlueSocket() { } } + class TwoAbyssalSockets : SocketColourFilter + { + public TwoAbyssalSockets() + : base("A", 2, "At Least 2 Abyssal Sockets", "Gear with 2 or more abyssal sockets") + { } + } + + class TwoWhiteSockets : SocketColourFilter + { + public TwoWhiteSockets() + : base("G", 2, "At Least 2 White Sockets", "Gear with 2 or more white sockets") + { } + } + class TwoRedSockets : SocketColourFilter { public TwoRedSockets() @@ -92,6 +120,13 @@ public TwoBlueSockets() { } } + class ThreeWhiteSockets : SocketColourFilter + { + public ThreeWhiteSockets() + : base("G", 3, "At Least 3 White Sockets", "Gear with 3 or more white sockets") + { } + } + class ThreeRedSockets : SocketColourFilter { public ThreeRedSockets() @@ -113,6 +148,13 @@ public ThreeBlueSockets() { } } + class FourWhiteSockets : SocketColourFilter + { + public FourWhiteSockets() + : base("G", 4, "At Least 4 White Sockets", "Gear with 4 or more white sockets") + { } + } + class FourRedSockets : SocketColourFilter { public FourRedSockets() @@ -134,6 +176,13 @@ public FourBlueSockets() { } } + class FiveWhiteSockets : SocketColourFilter + { + public FiveWhiteSockets() + : base("G", 5, "At Least 5 White Sockets", "Gear with 5 or more white sockets") + { } + } + class FiveRedSockets : SocketColourFilter { public FiveRedSockets() diff --git a/Procurement/ViewModel/Filters/ForumExport/StatFilter.cs b/Procurement/ViewModel/Filters/ForumExport/StatFilter.cs index f3aee799..f43791a6 100644 --- a/Procurement/ViewModel/Filters/ForumExport/StatFilter.cs +++ b/Procurement/ViewModel/Filters/ForumExport/StatFilter.cs @@ -28,6 +28,15 @@ public bool Applicable(POEApi.Model.Item item) if (gear.Explicitmods != null) all.AddRange(gear.Explicitmods.Select(s => s)); + if (gear.CraftedMods != null) + all.AddRange(gear.CraftedMods.Select(s => s)); + + if (gear.FracturedMods != null) + all.AddRange(gear.FracturedMods.Select(s => s)); + + if (gear.EnchantMods != null) + all.AddRange(gear.EnchantMods.Select(s => s)); + foreach (string stat in all) { Regex result = pool.Find(s => s.IsMatch(stat)); diff --git a/Procurement/ViewModel/Filters/ForumExport/StatFilterBase.cs b/Procurement/ViewModel/Filters/ForumExport/StatFilterBase.cs index 07963d04..23f40f33 100644 --- a/Procurement/ViewModel/Filters/ForumExport/StatFilterBase.cs +++ b/Procurement/ViewModel/Filters/ForumExport/StatFilterBase.cs @@ -16,7 +16,7 @@ public StatFilterBase(string keyword, string help, params string[] stats) this.help = help; this.stats = stats.Select(stat => new Regex(stat, RegexOptions.Singleline | RegexOptions.IgnoreCase | RegexOptions.CultureInvariant)).ToList(); } - public bool CanFormCategory + public virtual bool CanFormCategory { get { return true; } } diff --git a/Procurement/ViewModel/ForumExportVisitors/ExplicitModVisitor.cs b/Procurement/ViewModel/ForumExportVisitors/ExplicitModVisitor.cs index 435f996d..465c6861 100644 --- a/Procurement/ViewModel/ForumExportVisitors/ExplicitModVisitor.cs +++ b/Procurement/ViewModel/ForumExportVisitors/ExplicitModVisitor.cs @@ -18,6 +18,7 @@ public ExplicitModVisitor() tokens.Add("{Life}", new LifeFilter()); tokens.Add("{LifeRegen}", new LifeRegenFilter()); tokens.Add("{CritChance}", new CritChanceFilter()); + tokens.Add("{CritMultiplier}", new CritMultiplierFilter()); tokens.Add("{GlobalCritChance}", new GlobalCritChanceFilter()); tokens.Add("{GlobalCritMultiplier}", new GlobalCritMultiplierFilter()); tokens.Add("{SpellDamage}", new SpellDamageFilter());