From 8a59c7ad3ae5aed22b3d21d89cabd655b889c5b3 Mon Sep 17 00:00:00 2001 From: Eno77 <33687620+Eno77@users.noreply.github.com> Date: Sun, 27 Jul 2025 23:52:15 +0200 Subject: [PATCH] Update de.lua U45 Steilschuss parsing In U45 a new pattern for Steilschuss is introduced this commit introduces a damage parsing section (mainly a copy of the original damage parsing section) just for this new pattern used for Steilschuss --- Locale/de.lua | 54 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/Locale/de.lua b/Locale/de.lua index d2d8b19..d3e1933 100755 --- a/Locale/de.lua +++ b/Locale/de.lua @@ -596,6 +596,60 @@ L["Parse"] = function(line) return event_type.DMG_DEALT,initiatorName,targetName,skillName,amount,avoidType,critType,dmgType; end + -- 1.1) Damage line Steilschuss (its another pattern since U45) --- + -- Der erzielte zerstörerischer Treffer mit Steilschuss bei SPS-Übungspuppe, keine Schadensreduzierung in Höhe von 255,055 (688,649 von 9 Fokus) Beleriand Schaden auf Moral. + -- Der erzielte kritischer Treffer mit Steilschuss bei SPS-Übungspuppe, keine Schadensreduzierung in Höhe von 55,632 (0 von 0 Fokus) Beleriand Schaden auf Moral. + -- Der erzielte Treffer mit Steilschuss bei SPS-Übungspuppe, keine Schadensreduzierung in Höhe von 19,087 (0 von 0 Fokus) Beleriand Schaden auf Moral. + + local initiatorName,avoidAndCrit,skillName,targetNameAmountAndType = string.match(line,"^(.*) erzielte (.*)Treffer mit (.*) bei (.*)%.$"); + + if (initiatorName ~= nil) then + initiatorName = TrimArticles(initiatorName); + + local avoidType = + string.match(avoidAndCrit,"^teilweise geblockter") and 8 or + string.match(avoidAndCrit,"^teilweise parierter") and 9 or + string.match(avoidAndCrit,"^teilweise ausgewichener") and 10 or 1; + local critType = + string.match(avoidAndCrit,"kritischer $") and 2 or + string.match(avoidAndCrit,"zerst\195\182rerischer $") and 3 or 1; + + -- note: fromFocus is just a place holder, maybe there is a better way to match without having to use a local variable + local targetName,amount,fromFocus,dmgType,moralePower = string.match(targetNameAmountAndType, "^(.*) in H\195\182he von ([%d,]*) %((.*)%) (.*) Schaden auf (.*)$"); + -- damage was absorbed + if targetName == nil then + targetName = TrimArticles(targetNameAmountAndType); + amount = 0; + dmgType = 13; + moralePower = 3; + -- some damage was dealt + else + targetName = TrimArticles(targetName); + amount = string.gsub(amount,",","")+0; + -- note there may be no damage type + dmgType = + dmgType == "Allgemein" and 1 or + dmgType == "Feuer" and 2 or + dmgType == "Blitz" and 3 or + dmgType == "Frost" and 4 or + dmgType == "S\195\164ure" and 5 or + dmgType == "Schatten" and 6 or + dmgType == "Licht" and 7 or + dmgType == "Beleriand" and 8 or + dmgType == "Westernis" and 9 or + dmgType == "Uralte Zwergenart" and 10 or + dmgType == "Ork-Waffe" and 11 or + dmgType == "Hass" and 12 or 13; + moralePower = (moralePower == "Moral" and 1 or moralePower == "Kraft" and 2 or 3); + end + + -- Currently ignores damage to power + if (moralePower == 2) then return nil end + + -- Update + return event_type.DMG_DEALT,initiatorName,targetName,skillName,amount,avoidType,critType,dmgType; + end + -- 2) Heal line -- -- (note the distinction with which self heals are now handled)