Skip to content

Commit

Permalink
Cleaned out alternate gems that are no longer in the game.
Browse files Browse the repository at this point in the history
  • Loading branch information
leMicin committed Dec 30, 2024
1 parent c57e557 commit 13525ec
Show file tree
Hide file tree
Showing 18 changed files with 1 addition and 154 deletions.
Binary file modified Game Localization.xlsm
Binary file not shown.
2 changes: 1 addition & 1 deletion src/Sidekick.Apis.Poe/Parser/Headers/HeaderParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Regex GetRegexLine(string input)
return new Regex($"^{input} | {input}$");
}

Affixes = new Regex("(?:" + GetRegexLine(gameLanguageProvider.Language.AffixSuperior) + "|" + GetRegexLine(gameLanguageProvider.Language.AffixBlighted) + "|" + GetRegexLine(gameLanguageProvider.Language.AffixBlightRavaged) + "|" + GetRegexLine(gameLanguageProvider.Language.AffixAnomalous) + "|" + GetRegexLine(gameLanguageProvider.Language.AffixDivergent) + "|" + GetRegexLine(gameLanguageProvider.Language.AffixPhantasmal) + ")");
Affixes = new Regex("(?:" + GetRegexLine(gameLanguageProvider.Language.AffixSuperior) + "|" + GetRegexLine(gameLanguageProvider.Language.AffixBlighted) + "|" + GetRegexLine(gameLanguageProvider.Language.AffixBlightRavaged) + ")");
SuperiorAffix = new Regex("(?:" + GetRegexLine(gameLanguageProvider.Language.AffixSuperior) + ")");
}

Expand Down
39 changes: 0 additions & 39 deletions src/Sidekick.Apis.Poe/Parser/Properties/PropertyParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,6 @@ IInvariantModifierProvider invariantModifierProvider

private Regex? BlightRavaged { get; set; }

private Regex? Anomalous { get; set; }

private Regex? Divergent { get; set; }

private Regex? Phantasmal { get; set; }

private Regex? AreaLevel { get; set; }

private Regex? Unidentified { get; set; }
Expand Down Expand Up @@ -86,9 +80,6 @@ public Task Initialize()
MonsterPackSize = gameLanguageProvider.Language.DescriptionMonsterPackSize.ToRegexIntCapture();
Blighted = gameLanguageProvider.Language.AffixBlighted.ToRegexAffix(gameLanguageProvider.Language.AffixSuperior);
BlightRavaged = gameLanguageProvider.Language.AffixBlightRavaged.ToRegexAffix(gameLanguageProvider.Language.AffixSuperior);
Anomalous = gameLanguageProvider.Language.AffixAnomalous.ToRegexAffix(gameLanguageProvider.Language.AffixSuperior);
Divergent = gameLanguageProvider.Language.AffixDivergent.ToRegexAffix(gameLanguageProvider.Language.AffixSuperior);
Phantasmal = gameLanguageProvider.Language.AffixPhantasmal.ToRegexAffix(gameLanguageProvider.Language.AffixSuperior);

Unidentified = gameLanguageProvider.Language.DescriptionUnidentified.ToRegexLine();
Corrupted = gameLanguageProvider.Language.DescriptionCorrupted.ToRegexLine();
Expand Down Expand Up @@ -276,9 +267,6 @@ private Common.Game.Items.Properties ParseGemProperties(ParsingItem parsingItem)
GemLevel = GetInt(Level, propertyBlock),
Quality = GetInt(Quality, propertyBlock),
AlternateQuality = GetBool(AlternateQuality, parsingItem),
Anomalous = GetBool(Anomalous, parsingItem),
Divergent = GetBool(Divergent, parsingItem),
Phantasmal = GetBool(Phantasmal, parsingItem),
};
}

Expand Down Expand Up @@ -384,31 +372,4 @@ private static double GetDouble(Regex? pattern, ParsingBlock parsingBlock)

return 0;
}

private static double GetDps(Regex? pattern, ParsingBlock parsingBlock, double attacksPerSecond)
{
if (pattern == null)
{
return 0;
}

if (!parsingBlock.TryParseRegex(pattern, out var match))
{
return 0;
}

var matches = new Regex("(\\d+-\\d+)").Matches(match.Value);
var dps = matches.Select(x => x.Value.Split("-"))
.Sum(split =>
{
if (double.TryParse(split[0], NumberStyles.Any, CultureInfo.InvariantCulture, out var minValue) && double.TryParse(split[1], NumberStyles.Any, CultureInfo.InvariantCulture, out var maxValue))
{
return (minValue + maxValue) / 2d;
}

return 0d;
});

return Math.Round(dps * attacksPerSecond, 2);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,5 @@ public SearchFilterOption(PropertyFilter filter)
}

public string Option { get; set; }

internal class AlternateGemQualityOptions
{
public const string Anomalous = "1";
public const string Divergent = "2";
public const string Phantasmal = "3";
}
}
}
18 changes: 0 additions & 18 deletions src/Sidekick.Apis.Poe/Trade/TradeSearchService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -408,24 +408,6 @@ public async Task<TradeSearchResult<string>> Search(Item item, PropertyFilters?
var filters = new MiscFilterGroup();
var hasValue = false;

if (item.Properties.Anomalous)
{
filters.Filters.GemQualityType = new SearchFilterOption(SearchFilterOption.AlternateGemQualityOptions.Anomalous);
hasValue = true;
}

if (item.Properties.Divergent)
{
filters.Filters.GemQualityType = new SearchFilterOption(SearchFilterOption.AlternateGemQualityOptions.Divergent);
hasValue = true;
}

if (item.Properties.Phantasmal)
{
filters.Filters.GemQualityType = new SearchFilterOption(SearchFilterOption.AlternateGemQualityOptions.Phantasmal);
hasValue = true;
}

foreach (var propertyFilter in propertyFilters)
{
if (propertyFilter.Type == PropertyFilterType.Misc_Corrupted)
Expand Down
6 changes: 0 additions & 6 deletions src/Sidekick.Common/Game/Items/Properties.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,6 @@ public class Properties

public int GemLevel { get; init; }

public bool Anomalous { get; init; }

public bool Divergent { get; init; }

public bool Phantasmal { get; init; }

public int MapTier { get; init; }

public int AreaLevel { get; init; }
Expand Down
6 changes: 0 additions & 6 deletions src/Sidekick.Common/Game/Languages/IGameLanguage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,6 @@ public interface IGameLanguage

string AffixBlightRavaged { get; }

string AffixAnomalous { get; }

string AffixDivergent { get; }

string AffixPhantasmal { get; }

string InfluenceShaper { get; }

string InfluenceElder { get; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,6 @@ public class GameLanguageDe : IGameLanguage
public string AffixSuperior => "(hochwertig)";
public string AffixBlighted => "Befallene";
public string AffixBlightRavaged => "Extrem befallene";
public string AffixAnomalous => "(anormal)";
public string AffixDivergent => "(abweichend)";
public string AffixPhantasmal => "(illusorisch)";

public string InfluenceShaper => "Schöpfer-Gegenstand";
public string InfluenceElder => "Ältesten-Gegenstand";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,6 @@ public class GameLanguageEn : IGameLanguage
public string AffixSuperior => "Superior";
public string AffixBlighted => "Blighted";
public string AffixBlightRavaged => "Blight-ravaged";
public string AffixAnomalous => "Anomalous";
public string AffixDivergent => "Divergent";
public string AffixPhantasmal => "Phantasmal";

public string InfluenceShaper => "Shaper Item";
public string InfluenceElder => "Elder Item";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,6 @@ public class GameLanguageEs : IGameLanguage
public string AffixSuperior => "Superior";
public string AffixBlighted => "infestado";
public string AffixBlightRavaged => "devastado por la plaga";
public string AffixAnomalous => "anómala";
public string AffixDivergent => "divergente";
public string AffixPhantasmal => "fantasmal";

public string InfluenceShaper => "Objeto del Creador";
public string InfluenceElder => "Objeto del Antiguo";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,6 @@ public class GameLanguageFr : IGameLanguage
public string AffixSuperior => "supérieur";
public string AffixBlighted => "Carte infestée";
public string AffixBlightRavaged => "Carte ravagée par l'Infestation";
public string AffixAnomalous => "/anormale?s?/";
public string AffixDivergent => "/divergente?s?/";
public string AffixPhantasmal => "/fantasmatiques?/";

public string InfluenceShaper => "Objet du Façonneur";
public string InfluenceElder => "Objet de l'Ancien";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,6 @@ public class GameLanguageJp : IGameLanguage
public string AffixSuperior => "上質な";
public string AffixBlighted => "ブライト";
public string AffixBlightRavaged => "ブライトに破壊された";
public string AffixAnomalous => "異常な";
public string AffixDivergent => "相違の";
public string AffixPhantasmal => "幻想の";

public string InfluenceShaper => "シェイパーアイテム";
public string InfluenceElder => "エルダーアイテム";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,6 @@ public class GameLanguageKr : IGameLanguage
public string AffixSuperior => "상";
public string AffixBlighted => "역병";
public string AffixBlightRavaged => "역병에 유린당한";
public string AffixAnomalous => "기묘한";
public string AffixDivergent => "분기하는";
public string AffixPhantasmal => "환영의";

public string InfluenceShaper => "쉐이퍼 아이템";
public string InfluenceElder => "엘더 아이템";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,6 @@ public class GameLanguagePt : IGameLanguage
public string AffixSuperior => "Superior";
public string AffixBlighted => "Infestado";
public string AffixBlightRavaged => "Devastado";
public string AffixAnomalous => "Anômalo";
public string AffixDivergent => "Divergente";
public string AffixPhantasmal => "Fantasmal";

public string InfluenceShaper => "Item do Criador";
public string InfluenceElder => "Item do Ancião";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,6 @@ public class GameLanguageRu : IGameLanguage
public string AffixSuperior => "высокого качества";
public string AffixBlighted => "Заражённая";
public string AffixBlightRavaged => "Разорённая Скверной";
public string AffixAnomalous => "Аномальный:";
public string AffixDivergent => "Искривлённый:";
public string AffixPhantasmal => "Фантомный:";

public string InfluenceShaper => "Предмет Создателя";
public string InfluenceElder => "Древний предмет";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,6 @@ public class GameLanguageTh : IGameLanguage
public string AffixSuperior => "Superior";
public string AffixBlighted => "Blighted";
public string AffixBlightRavaged => "Blight-ravaged";
public string AffixAnomalous => "Anomalous";
public string AffixDivergent => "Divergent";
public string AffixPhantasmal => "Phantasmal";

public string InfluenceShaper => "ไอเทมเชปเปอร์";
public string InfluenceElder => "ไอเทมเอลเดอร์";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,6 @@ public class GameLanguageZhTw : IGameLanguage

public string AffixBlightRavaged => "凋落蔓延";

public string AffixAnomalous => "異常的";

public string AffixDivergent => "相異的";

public string AffixPhantasmal => "幻影的";

public string InfluenceShaper => "塑者之物";

public string InfluenceElder => "尊師之物";
Expand Down
44 changes: 0 additions & 44 deletions tests/Sidekick.Apis.Poe.Tests/Poe1/Parser/GemParsing.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,50 +63,6 @@ Place into an item socket of the right colour to gain this skill.Right click to
Assert.True(actual.Properties.Corrupted);
}

[Fact]
public void ParseAnomalousGem()
{
var actual = parser.ParseItem(@"Item Class: Unknown
Rarity: Gem
Anomalous Static Strike
--------
Attack, Melee, Strike, AoE, Duration, Lightning, Chaining
Level: 1
Mana Cost: 6
Effectiveness of Added Damage: 110%
Quality: +17% (augmented)
Alternate Quality
--------
Requirements:
Level: 12
Str: 21
Int: 14
--------
Attack with a melee weapon, gaining static energy for a duration if you hit an enemy. While you have static energy, you'll frequently hit a number of nearby enemies with beams, dealing attack damage.
--------
Beams Hit Enemies every 0.40 seconds
50% of Physical Damage Converted to Lightning Damage
Deals 110% of Base Damage
Base duration is 2.00 seconds
Chains +1 Times
17% increased Damage
Beams deal 40% less Damage
4 maximum Beam Targets
--------
Experience: 1/15249
--------
Place into an item socket of the right colour to gain this skill. Right click to remove from a socket.
");

Assert.Equal(Category.Gem, actual.Header.Category);
Assert.Equal(Rarity.Gem, actual.Header.Rarity);
Assert.Equal("Static Strike", actual.Header.ApiType);
Assert.Equal(1, actual.Properties.GemLevel);
Assert.Equal(17, actual.Properties.Quality);
Assert.True(actual.Properties.AlternateQuality);
Assert.False(actual.Properties.Corrupted);
}

[Fact]
public void ArcaneSurgeSupport()
{
Expand Down

0 comments on commit 13525ec

Please sign in to comment.