Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Krealle committed Sep 10, 2024
2 parents de855c0 + 4c34d83 commit 3202789
Show file tree
Hide file tree
Showing 293 changed files with 1,377 additions and 3,250 deletions.
3 changes: 3 additions & 0 deletions src/CHANGELOG.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ import SpellLink from 'interface/SpellLink';

// prettier-ignore
export default [
change(date(2024, 9, 9), 'Fix character search showing UNKNOWN instead of THE WAR WITHIN.', ToppleTheNun),
change(date(2024, 9, 8), "Add Nerub'ar Palace bosses and season 1 M+ dungeons.", ToppleTheNun),
change(date(2024, 9, 6), "Add missing supportID property to DamageEvent interface", Vollmer),
change(date(2024, 9, 5), 'Update Rogue spells for Classic Cataclysm', jazminite),
change(date(2024, 9, 4), 'Updates to Active Time calculation to avoid cases where overcount could occur.', Sref),
change(date(2024, 9, 3), "Fixed a bug where the Death Recap wouldn't detect some defensive buffs", Sref),
change(date(2024, 9, 3), 'Remove AbilitiesMissing module.', ToppleTheNun),
Expand Down
3 changes: 0 additions & 3 deletions src/analysis/classic/rogue/assassination/CombatLogParser.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
// Base file
import BaseCombatLogParser from 'parser/classic/CombatLogParser';
// Shared
import lowRankSpellsSuggestion from 'parser/classic/suggestions/lowRankSpells';
import { lowRankSpells } from '../shared';
// Features
import Abilities from './modules/features/Abilities';
import AlwaysBeCasting from './modules/features/AlwaysBeCasting';
Expand All @@ -14,7 +12,6 @@ import Checklist from './modules/checklist/Module';
class CombatLogParser extends BaseCombatLogParser {
static specModules = {
// Shared
lowRankSpells: lowRankSpellsSuggestion(lowRankSpells),
// Features
abilities: Abilities,
alwaysBeCasting: AlwaysBeCasting,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,22 @@ class Abilities extends CoreAbilities {
return [
// Rotational
{
spell: [SPELLS.MUTILATE.id, ...SPELLS.MUTILATE.lowRanks],
spell: SPELLS.MUTILATE.id,
category: SPELL_CATEGORY.ROTATIONAL,
gcd: { base: 1000 },
},
{
spell: [SPELLS.SLICE_AND_DICE.id, ...SPELLS.SLICE_AND_DICE.lowRanks],
spell: SPELLS.SLICE_AND_DICE.id,
category: SPELL_CATEGORY.ROTATIONAL,
gcd: { base: 1000 },
},
{
spell: [SPELLS.HUNGER_FOR_BLOOD.id],
spell: SPELLS.ENVENOM.id,
category: SPELL_CATEGORY.ROTATIONAL,
gcd: { base: 1000 },
},
{
spell: [SPELLS.ENVENOM.id, ...SPELLS.ENVENOM.lowRanks],
category: SPELL_CATEGORY.ROTATIONAL,
gcd: { base: 1000 },
},
{
spell: [SPELLS.RUPTURE.id, ...SPELLS.RUPTURE.lowRanks],
spell: SPELLS.RUPTURE.id,
category: SPELL_CATEGORY.ROTATIONAL,
gcd: { base: 1000 },
},
Expand Down Expand Up @@ -58,17 +53,17 @@ class Abilities extends CoreAbilities {
},
// Defensive
{
spell: [SPELLS.FEINT.id, ...SPELLS.FEINT.lowRanks],
spell: SPELLS.FEINT.id,
category: SPELL_CATEGORY.DEFENSIVE,
gcd: { base: 1000 },
},
{
spell: [SPELLS.EVASION.id, ...SPELLS.EVASION.lowRanks],
spell: SPELLS.EVASION.id,
category: SPELL_CATEGORY.DEFENSIVE,
gcd: null,
},
{
spell: [SPELLS.VANISH.id, ...SPELLS.VANISH.lowRanks],
spell: SPELLS.VANISH.id,
category: SPELL_CATEGORY.DEFENSIVE,
gcd: null,
},
Expand All @@ -79,7 +74,7 @@ class Abilities extends CoreAbilities {
},
// Other spells (not apart of the normal rotation)
{
spell: [SPELLS.EVISCERATE.id, ...SPELLS.EVISCERATE.lowRanks],
spell: SPELLS.EVISCERATE.id,
category: SPELL_CATEGORY.OTHERS,
gcd: { base: 1000 },
},
Expand All @@ -95,12 +90,12 @@ class Abilities extends CoreAbilities {
gcd: null,
},
{
spell: [SPELLS.KIDNEY_SHOT.id, ...SPELLS.KIDNEY_SHOT.lowRanks],
spell: SPELLS.KIDNEY_SHOT.id,
category: SPELL_CATEGORY.UTILITY,
gcd: { base: 1000 },
},
{
spell: [SPELLS.SPRINT.id, ...SPELLS.SPRINT.lowRanks],
spell: SPELLS.SPRINT.id,
category: SPELL_CATEGORY.UTILITY,
gcd: null,
},
Expand Down
1 change: 0 additions & 1 deletion src/analysis/classic/rogue/shared/index.ts

This file was deleted.

10 changes: 0 additions & 10 deletions src/analysis/classic/rogue/shared/lowRankSpells.ts

This file was deleted.

2 changes: 2 additions & 0 deletions src/analysis/retail/evoker/augmentation/CHANGELOG.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import TALENTS from 'common/TALENTS/evoker';

export default [
change(date(2024, 9, 6), <>Implement <SpellLink spell={TALENTS.WINGLEADER_TALENT}/> module</>, Vollmer),
change(date(2024, 9, 6), <>Update MajorDefensive module for <SpellLink spell={TALENTS.LIFECINDERS_TALENT}/> and <SpellLink spell={TALENTS.HARDENED_SCALES_TALENT}/></>, Vollmer),
change(date(2024, 9, 6), <>Implement <SpellLink spell={TALENTS.SLIPSTREAM_TALENT}/> module</>, Vollmer),
change(date(2024, 9, 6), <>Implement <SpellLink spell={TALENTS.EXTENDED_BATTLE_TALENT}/> module</>, Vollmer),
change(date(2024, 8, 14), <>Implement <SpellLink spell={TALENTS.DIVERTED_POWER_TALENT}/> module</>, Vollmer),
change(date(2024, 8, 14), <>Implement <SpellLink spell={TALENTS.UNRELENTING_SIEGE_TALENT}/> module</>, Vollmer),
Expand Down
2 changes: 2 additions & 0 deletions src/analysis/retail/evoker/augmentation/CombatLogParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ import {
DivertedPower,
UnrelentingSiege,
Wingleader,
Slipstream,
} from 'analysis/retail/evoker/shared';

class CombatLogParser extends MainCombatLogParser {
Expand Down Expand Up @@ -132,6 +133,7 @@ class CombatLogParser extends MainCombatLogParser {
divertedPower: DivertedPower,
unrelentingSiege: UnrelentingSiege,
wingLeader: Wingleader,
slipstream: Slipstream,

// Features
buffTrackerGraph: BuffTrackerGraph,
Expand Down
2 changes: 2 additions & 0 deletions src/analysis/retail/evoker/devastation/CHANGELOG.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import SPELLS from 'common/SPELLS/evoker';

export default [
change(date(2024, 9, 6), <>Implement <SpellLink spell={TALENTS_EVOKER.WINGLEADER_TALENT}/> module</>, Vollmer),
change(date(2024, 9, 6), <>Update MajorDefensive module for <SpellLink spell={TALENTS_EVOKER.LIFECINDERS_TALENT}/> and <SpellLink spell={TALENTS_EVOKER.HARDENED_SCALES_TALENT}/></>, Vollmer),
change(date(2024, 9, 6), <>Implement <SpellLink spell={TALENTS_EVOKER.SLIPSTREAM_TALENT}/> module</>, Vollmer),
change(date(2024, 9, 6), <>Implement <SpellLink spell={TALENTS_EVOKER.EXTENDED_BATTLE_TALENT}/> module</>, Vollmer),
change(date(2024, 8, 14), <>Implement <SpellLink spell={TALENTS_EVOKER.DIVERTED_POWER_TALENT}/> module</>, Vollmer),
change(date(2024, 8, 14), <>Implement <SpellLink spell={TALENTS_EVOKER.UNRELENTING_SIEGE_TALENT}/> module</>, Vollmer),
Expand Down
2 changes: 2 additions & 0 deletions src/analysis/retail/evoker/devastation/CombatLogParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ import {
DivertedPower,
UnrelentingSiege,
Wingleader,
Slipstream,
} from 'analysis/retail/evoker/shared';
import ExpandedLungs from '../shared/modules/talents/hero/flameshaper/ExpandedLungs';
import FanTheFlames from '../shared/modules/talents/hero/flameshaper/FanTheFlames';
Expand Down Expand Up @@ -142,6 +143,7 @@ class CombatLogParser extends MainCombatLogParser {
divertedPower: DivertedPower,
unrelentingSiege: UnrelentingSiege,
wingLeader: Wingleader,
slipstream: Slipstream,

// core abilities
disintegrate: Disintegrate,
Expand Down
1 change: 1 addition & 0 deletions src/analysis/retail/evoker/shared/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ export const IMMINENT_DESTRUCTION_ESSENCE_REDUCTION = 1;
export const MELT_ARMOR_MULTIPLIER = 0.2;
export const MIGHT_OF_THE_BLACK_DRAGONFLIGHT_MULTIPLIER = 0.2;
export const UNRELENTING_SIEGE_MULTIPLIER_PER_STACK = 0.01;
export const HARDENED_SCALES_MITIGATION = 0.1;

export const MASS_DISINTEGRATE_MULTIPLIER_PER_MISSING_TARGET = 0.15;
export const MASS_ERUPTION_MULTIPLIER_PER_MISSING_TARGET =
Expand Down
1 change: 1 addition & 0 deletions src/analysis/retail/evoker/shared/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,5 @@ export { default as ExtendedBattle } from './modules/talents/hero/scalecommander
export { default as DivertedPower } from './modules/talents/hero/scalecommander/DivertedPower';
export { default as UnrelentingSiege } from './modules/talents/hero/scalecommander/UnrelentingSiege';
export { default as Wingleader } from './modules/talents/hero/scalecommander/Wingleader';
export { default as Slipstream } from './modules/talents/hero/scalecommander/Slipstream';
export * from './constants';
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,12 @@ import Events, { DamageEvent } from 'parser/core/Events';
import { SpellLink } from 'interface';
import MajorDefensiveStatistic from 'interface/MajorDefensiveStatistic';
import STATISTIC_CATEGORY from 'parser/ui/STATISTIC_CATEGORY';
import { HARDENED_SCALES_MITIGATION } from '../../constants';

// TWW ScaleCommander hero talent has a +5% buff so just preparing for that.
const BASE_MITIGATION = 0.3;
const HARDENED_SCALES_MITIGATION = 0.05;

class ObsidianScales extends MajorDefensiveBuff {
hasHardenedScales = false;
hasHardenedScales = this.selectedCombatant.hasTalent(TALENTS.HARDENED_SCALES_TALENT);
mitPct: number = BASE_MITIGATION + (this.hasHardenedScales ? HARDENED_SCALES_MITIGATION : 0);

constructor(options: Options) {
Expand All @@ -39,6 +38,13 @@ class ObsidianScales extends MajorDefensiveBuff {
return (
<p>
<SpellLink spell={TALENTS.OBSIDIAN_SCALES_TALENT} /> reduces the damage you take by 30%.
{this.hasHardenedScales && (
<>
<br />
<SpellLink spell={TALENTS.HARDENED_SCALES_TALENT} /> increases this mitigation to{' '}
<strong>{this.mitPct * 100}%</strong>.
</>
)}
</p>
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,10 @@ import MajorDefensive, {
} from 'interface/guide/components/MajorDefensives/MajorDefensiveAnalyzer';
import { Options, SELECTED_PLAYER } from 'parser/core/Analyzer';
import TALENTS from 'common/TALENTS/evoker';
import SPELLS from 'common/SPELLS/evoker';
import Events, {
ApplyBuffEvent,
DamageEvent,
GetRelatedEvent,
GetRelatedEvents,
HealEvent,
} from 'parser/core/Events';
import { SpellLink } from 'interface';
Expand All @@ -35,34 +34,43 @@ import BoringValue from 'parser/ui/BoringValueText';
import MAGIC_SCHOOLS, { color } from 'game/MAGIC_SCHOOLS';
import { QualitativePerformance } from 'parser/ui/QualitativePerformance';
import { ReactNode } from 'react';
import {
RENEWING_BLAZE_BUFFS,
RENEWING_BLAZE_HEAL,
} from '../normalizers/DefensiveCastLinkNormalizer';
import { RENEWING_BLAZE_HEAL } from '../normalizers/DefensiveCastLinkNormalizer';

type RenewingBlazeHealBuff = {
start: ApplyBuffEvent;
events: HealEvent[];
amount: number;
overheal: number;
partnerAmount: number;
};

class RenewingBlaze extends MajorDefensiveBuff {
renewingBlazeHealBuffs: RenewingBlazeHealBuff[] = [];
normalizedMitigations: Mitigation[] = [];
hasCinders = false;

constructor(options: Options) {
super(TALENTS.RENEWING_BLAZE_TALENT, buff(TALENTS.RENEWING_BLAZE_TALENT), options);
// Custom trigger since we only want to track mitigation during our
// personal buffs, not any external ones
const trigger = buff(TALENTS.RENEWING_BLAZE_TALENT);
trigger.applyTrigger = Events.applybuff
.spell(TALENTS.RENEWING_BLAZE_TALENT)
.by(SELECTED_PLAYER)
.to(SELECTED_PLAYER);
trigger.removeTrigger = Events.removebuff
.spell(TALENTS.RENEWING_BLAZE_TALENT)
.by(SELECTED_PLAYER)
.to(SELECTED_PLAYER);

super(TALENTS.RENEWING_BLAZE_TALENT, trigger, options);
this.active = this.selectedCombatant.hasTalent(TALENTS.RENEWING_BLAZE_TALENT);

this.hasCinders = this.selectedCombatant.hasTalent(TALENTS.LIFECINDERS_TALENT);

this.addEventListener(Events.damage.to(SELECTED_PLAYER), this.recordDamage);

this.addEventListener(
Events.heal.to(SELECTED_PLAYER).spell(SPELLS.RENEWING_BLAZE_HEAL),
this.recordHeal,
);
this.addEventListener(
Events.applybuff.to(SELECTED_PLAYER).spell(SPELLS.RENEWING_BLAZE_HEAL),
this.applyHealBuff,
Events.applybuff.by(SELECTED_PLAYER).to(SELECTED_PLAYER).spell(TALENTS.RENEWING_BLAZE_TALENT),
this.applyBuff,
);
this.addEventListener(Events.fightend, this.onFightEnd);
}
Expand All @@ -78,29 +86,33 @@ class RenewingBlaze extends MajorDefensiveBuff {
});
}

private recordHeal(event: HealEvent) {
const heal = this.renewingBlazeHealBuffs.find(
(buff) => GetRelatedEvent(event, RENEWING_BLAZE_HEAL) === buff.start,
);
if (!heal) {
console.warn('Unable to find parent buff for Major Defensive analyzer', this.spell, event);
return;
private applyBuff(event: ApplyBuffEvent) {
const heal = {
start: event,
amount: 0,
overheal: 0,
partnerAmount: -1,
};
if (this.hasCinders) {
heal.partnerAmount = 0;
}

heal.events.push(event);
heal.amount += event.amount;
heal.overheal += event.overheal ?? 0;
}
const healEvents = GetRelatedEvents<HealEvent>(event, RENEWING_BLAZE_HEAL);
for (const healEvent of healEvents) {
if (healEvent.targetID !== this.selectedCombatant.id) {
heal.partnerAmount += healEvent.amount;
continue;
}

private applyHealBuff(event: ApplyBuffEvent) {
this.renewingBlazeHealBuffs.push({ start: event, events: [], amount: 0, overheal: 0 });
heal.amount += healEvent.amount;
heal.overheal += healEvent.overheal ?? 0;
}
this.renewingBlazeHealBuffs.push(heal);
}

/** Returns the related Renewing Healing buff, for our Acc buff. */
private healBuff(mit: Mitigation): RenewingBlazeHealBuff | undefined {
return this.renewingBlazeHealBuffs.find(
(buff) => GetRelatedEvent(buff.start, RENEWING_BLAZE_BUFFS) === mit.start,
);
private healBuff(mit: Mitigation | undefined): RenewingBlazeHealBuff | undefined {
return this.renewingBlazeHealBuffs.find((buff) => buff.start === mit?.start);
}

// For some reason healing numbers and damage taken doesn't always
Expand All @@ -119,9 +131,7 @@ class RenewingBlaze extends MajorDefensiveBuff {
}

mitigationSegments(mit: Mitigation): MitigationSegment[] {
const heal = this.renewingBlazeHealBuffs.find(
(buff) => GetRelatedEvent(buff.start, RENEWING_BLAZE_BUFFS) === mit.start,
);
const heal = this.healBuff(mit);

return [
{
Expand Down Expand Up @@ -321,9 +331,7 @@ class RenewingBlaze extends MajorDefensiveBuff {

get cooldownDetailsComponent() {
return ({ analyzer, mit }: CooldownDetailsProps) => {
const heal = this.renewingBlazeHealBuffs.find(
(buff) => GetRelatedEvent(buff.start, RENEWING_BLAZE_BUFFS) === mit?.start,
);
const heal = this.healBuff(mit);
return <CooldownDetails analyzer={analyzer} mit={mit} heal={heal} />;
};
}
Expand Down Expand Up @@ -402,6 +410,26 @@ const CooldownDetails = ({
/>
</TableSegmentContainer>
</tr>

{heal.partnerAmount >= 0 && (
<tr>
<td>Partner healing</td>
<NumericColumn>{formatNumber(heal.partnerAmount)}</NumericColumn>

<TableSegmentContainer>
<MitigationTooltipSegment
color="#4ec04e"
maxWidth={100}
width={Math.min(1, heal.partnerAmount / mit.amount)}
/>
<MitigationTooltipSegment
color="rgba(255, 255, 255, 0.05)"
maxWidth={100}
width={Math.max(0, 1 - heal.partnerAmount / mit.amount)}
/>
</TableSegmentContainer>
</tr>
)}
</>
) : (
<>
Expand Down
Loading

0 comments on commit 3202789

Please sign in to comment.