From 5a51dcfc22b3adb1e4b26325a97f3120928f577f Mon Sep 17 00:00:00 2001 From: Inni <70386111+Dot-Inni@users.noreply.github.com> Date: Mon, 22 Jul 2024 20:55:24 +0200 Subject: [PATCH] [WHM] Track lost Divine Caress uses (#2031) * Add module for tracking unused Divine Grace opportunities - but it bork * Change module structure, fix wrong action, still borked. * Attempt to add debug messages and fix some other messes * Fix severity tiers, remove debug, finalize changes * Add changelog entry --- locale/de/messages.json | 1 + locale/en/messages.json | 1 + locale/fr/messages.json | 1 + locale/ja/messages.json | 1 + locale/ko/messages.json | 1 + locale/zh/messages.json | 1 + src/data/ACTIONS/root/WHM.ts | 2 +- src/data/STATUSES/root/WHM.ts | 1 + src/parser/jobs/whm/changelog.tsx | 9 +++++-- src/parser/jobs/whm/index.tsx | 1 - src/parser/jobs/whm/modules/DivineCaress.tsx | 25 ++++++++++++++++++++ src/parser/jobs/whm/modules/index.ts | 2 ++ 12 files changed, 42 insertions(+), 4 deletions(-) create mode 100644 src/parser/jobs/whm/modules/DivineCaress.tsx diff --git a/locale/de/messages.json b/locale/de/messages.json index 0075a22911..94fa5b2e7f 100644 --- a/locale/de/messages.json +++ b/locale/de/messages.json @@ -1110,6 +1110,7 @@ "whm.overheal.afflatus.name": "", "whm.overheal.hot.name": "Heilung über Zeit", "whm.overheal.liturgyofthebell.name": "Glockenspiel", + "whm.procs.suggestions.dropped-divine-caress.content": "", "whm.swiftcast.missed.suggestion.content": "Wirke Zauber mit <0/> bevor es abläuft. Dadurch kannst du Angriffe mit Anwendungszeit sofort benutzen, wie beispielsweise <1/> für schnelle Wiederbelebungen oder <2/> zwischen Angriffen mit globaler Abklingzeit (zum weaven).", "whm.thinair.messages.explanation": "", "whm.thinair.messages.no-casts": "Es wurden keine Ausführungen von <0/> aufgezeichnet", diff --git a/locale/en/messages.json b/locale/en/messages.json index 4fd91f3495..52937cc3a4 100644 --- a/locale/en/messages.json +++ b/locale/en/messages.json @@ -1110,6 +1110,7 @@ "whm.overheal.afflatus.name": "Afflatus Healing", "whm.overheal.hot.name": "Healing Over Time", "whm.overheal.liturgyofthebell.name": "Liturgy of the Bell", + "whm.procs.suggestions.dropped-divine-caress.content": "Try to use Divine Caress whenever you have used Temperance. It is a free, groupwide oGCD shield and heal over time!", "whm.swiftcast.missed.suggestion.content": "Cast a spell with <0/> before it expires. This allows you to instantly cast spells with a cast times, such as <1/> for a quick revive, or <2/> for weaving.", "whm.thinair.messages.explanation": "The main use of <0/> should be to save MP on high MP-cost spells. Don't be afraid to hold it and lose a use over the fight as long as it covers an MP-heavy spell such as usages of <1/>, <2/>, and <3/>. Usages that did not save a considerable amount of MP are marked red.", "whm.thinair.messages.no-casts": "No casts recorded for <0/>", diff --git a/locale/fr/messages.json b/locale/fr/messages.json index c76b888d29..fcb4518317 100644 --- a/locale/fr/messages.json +++ b/locale/fr/messages.json @@ -1110,6 +1110,7 @@ "whm.overheal.afflatus.name": "Soin des Offrandes", "whm.overheal.hot.name": "Soins sur la durée", "whm.overheal.liturgyofthebell.name": "Tintinnabule", + "whm.procs.suggestions.dropped-divine-caress.content": "", "whm.swiftcast.missed.suggestion.content": "Lancez un sort avec <0/> avant qu'il n'expire. Cela vous permet d'utiliser un sort instantanément, comme <1/> pour une résurrection rapide ou <2/> pour weave.", "whm.thinair.messages.explanation": "L'utilisation principale de <0/> devrait être d'économiser des PM sur des sorts ayant un coût élevé. N'ayez pas peur de garder une charge et d'en perdre une sur la durée du combat, du moment qu'elle sont utilisées pour des sorts chers en PM comme <1/>, <2/> et <3/>.\nLes utilisations qui n'ont pas économisé un grand nombre de PM sont marquées en rouge.", "whm.thinair.messages.no-casts": "Aucune utilisation de <0/> enregistrée", diff --git a/locale/ja/messages.json b/locale/ja/messages.json index 99fefee41f..29c80cb6a9 100644 --- a/locale/ja/messages.json +++ b/locale/ja/messages.json @@ -1110,6 +1110,7 @@ "whm.overheal.afflatus.name": "", "whm.overheal.hot.name": "HoT", "whm.overheal.liturgyofthebell.name": "リタージー・オブ・ベル", + "whm.procs.suggestions.dropped-divine-caress.content": "", "whm.swiftcast.missed.suggestion.content": "<0/>の効果時間が切れる前に魔法を使用してください。これにより、素早く組成するための<1/>や、アビリティを挟むための<2/>など、詠唱時間を持つ魔法を無詠唱で使用することができます。", "whm.thinair.messages.explanation": "<0/> の主な用途は、MP コストの高い呪文で MP を節約することです。<1/>、<2/>、<3/>のようなMPを多く消費する呪文をカバーするためであれば、戦闘中の使用で保持できず失うことを恐れてはいけません。 MP を大幅に節約できなかった使用法は赤色で表示されます。", "whm.thinair.messages.no-casts": "<0/> の際に何もキャストされませんでした。", diff --git a/locale/ko/messages.json b/locale/ko/messages.json index 1c47c7b73c..9d8c7d571f 100644 --- a/locale/ko/messages.json +++ b/locale/ko/messages.json @@ -1110,6 +1110,7 @@ "whm.overheal.afflatus.name": "황홀한 마음 치유", "whm.overheal.hot.name": "지속 치유", "whm.overheal.liturgyofthebell.name": "예배종", + "whm.procs.suggestions.dropped-divine-caress.content": "", "whm.swiftcast.missed.suggestion.content": "<0/> 지속 시간이 만료되기 전에 기술을 시전하십시오. <1/> 기술로 빠르게 부활하거나 <2/> 기술로 논글쿨 기술을 끼워넣을 수 있습니다.", "whm.thinair.messages.explanation": "<0/> 기술은 MP 요구량이 높은 기술에 사용해야 합니다. <1/>, <2/>, <3/> 등 많은 MP를 요구하는 기술과 함께 사용하여 MP 소모량을 줄이십시오. MP 소모량이 크게 아껴지지 않았다면 하단에서 붉은색으로 표시됩니다.", "whm.thinair.messages.no-casts": "<0/> 사용 기록 없음", diff --git a/locale/zh/messages.json b/locale/zh/messages.json index d9a268423d..23e94f6a98 100644 --- a/locale/zh/messages.json +++ b/locale/zh/messages.json @@ -1110,6 +1110,7 @@ "whm.overheal.afflatus.name": "安慰之心治疗", "whm.overheal.hot.name": "HoT", "whm.overheal.liturgyofthebell.name": "礼仪之铃", + "whm.procs.suggestions.dropped-divine-caress.content": "", "whm.swiftcast.missed.suggestion.content": "在<0/>结束之前放一个法术。这样你就可以用<1/>秒拉人或者<2/>来插入能力技。", "whm.thinair.messages.explanation": "<0/>的主要用途应当是在战斗中省下高耗蓝魔法的蓝耗。在战斗中,不要担心它会因为没有转好就用而浪费使用机会,只要覆盖到了蓝量消耗大的魔法,例如<1/>、<2/>和<3/>就可以。未能有效节约蓝量的使用记录已被标红。", "whm.thinair.messages.no-casts": "没有<0/>的使用记录", diff --git a/src/data/ACTIONS/root/WHM.ts b/src/data/ACTIONS/root/WHM.ts index 85426fb283..b22b5ccd18 100644 --- a/src/data/ACTIONS/root/WHM.ts +++ b/src/data/ACTIONS/root/WHM.ts @@ -8,7 +8,7 @@ export const WHM = ensureActions({ name: 'Divine Caress', icon: iconUrl(2128), cooldown: 1000, - statusesApplied: ['DIVINE_GRACE'], + statusesApplied: ['DIVINE_CARESS'], }, MEDICA_III: { id: 37010, diff --git a/src/data/STATUSES/root/WHM.ts b/src/data/STATUSES/root/WHM.ts index 8a485aa7c0..6fd25084ad 100644 --- a/src/data/STATUSES/root/WHM.ts +++ b/src/data/STATUSES/root/WHM.ts @@ -31,6 +31,7 @@ export const WHM = ensureStatuses({ name: 'Sacred Sight', icon: iconUrl(18669), duration: 30000, + stacksApplied: 3, }, LITURGY_OF_THE_BELL: { id: 2709, diff --git a/src/parser/jobs/whm/changelog.tsx b/src/parser/jobs/whm/changelog.tsx index b2766cddb4..e1ecbc1fa2 100644 --- a/src/parser/jobs/whm/changelog.tsx +++ b/src/parser/jobs/whm/changelog.tsx @@ -1,5 +1,5 @@ -// import CONTRIBUTORS from 'data/CONTRIBUTORS' -// import React from 'react' +import CONTRIBUTORS from 'data/CONTRIBUTORS' +import React from 'react' export const changelog = [ // { @@ -7,4 +7,9 @@ export const changelog = [ // Changes: () => <>The changes you made, // contributors: [CONTRIBUTORS.YOU], // }, + { + date: new Date('2024-07-22'), + Changes: () => <>Added tracking for unused Divine Caress procs, + contributors: [CONTRIBUTORS.INNI], + }, ] diff --git a/src/parser/jobs/whm/index.tsx b/src/parser/jobs/whm/index.tsx index 7506f0928c..a37a6bd3cb 100644 --- a/src/parser/jobs/whm/index.tsx +++ b/src/parser/jobs/whm/index.tsx @@ -1,6 +1,5 @@ import {t} from '@lingui/macro' import TransMarkdown from 'components/ui/TransMarkdown' -// import CONTRIBUTORS, {ROLES} from 'data/CONTRIBUTORS' import CONTRIBUTORS, {ROLES} from 'data/CONTRIBUTORS' import {Meta} from 'parser/core/Meta' import React from 'react' diff --git a/src/parser/jobs/whm/modules/DivineCaress.tsx b/src/parser/jobs/whm/modules/DivineCaress.tsx new file mode 100644 index 0000000000..716bc78e4b --- /dev/null +++ b/src/parser/jobs/whm/modules/DivineCaress.tsx @@ -0,0 +1,25 @@ +import {Trans} from '@lingui/react' +import {Procs as CoreProcs} from 'parser/core/modules/Procs' +import {SEVERITY} from 'parser/core/modules/Suggestions' +import React from 'react' + +export class DivineCaress extends CoreProcs { + + //Track Divine Caress as the only status currently + override trackedProcs = [ + { + procStatus: this.data.statuses.DIVINE_GRACE, + consumeActions: [this.data.actions.DIVINE_CARESS], + }, + ] + override showDroppedProcSuggestion = true; + override droppedProcIcon = this.data.actions.DIVINE_CARESS.icon; + override droppedProcContent = + + Try to use Divine Caress whenever you have used Temperance. It is a free, groupwide oGCD shield and heal over time! + + override droppedProcSeverityTiers = { + 1: SEVERITY.MEDIUM, + 3: SEVERITY.MAJOR, + } +} diff --git a/src/parser/jobs/whm/modules/index.ts b/src/parser/jobs/whm/modules/index.ts index e64e7e1121..8805d7d86a 100644 --- a/src/parser/jobs/whm/modules/index.ts +++ b/src/parser/jobs/whm/modules/index.ts @@ -1,6 +1,7 @@ import {ActionTimeline} from './ActionTimeline' import {CastTime} from './CastTime' import {Defensives} from './Defensives' +import {DivineCaress} from './DivineCaress' import {DoTs} from './DoTs' import {Interrupts} from './Interrupts' import {Lilies} from './Lilies' @@ -14,6 +15,7 @@ export default [ ActionTimeline, CastTime, Defensives, + DivineCaress, DoTs, Interrupts, Lilies,