Skip to content

Commit

Permalink
Old analysis updated to new standards. (For the most part)
Browse files Browse the repository at this point in the history
It works, but the actually analysis part has not been updated properly yet.
  • Loading branch information
Toreole committed Jan 16, 2023
1 parent 0a05570 commit 6a7e8c9
Show file tree
Hide file tree
Showing 29 changed files with 407 additions and 541 deletions.
3 changes: 2 additions & 1 deletion src/analysis/retail/warrior/arms/CHANGELOG.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@

import { change, date } from 'common/changelog';
import SPELLS from 'common/SPELLS';
import TALENTS from 'common/TALENTS/warrior'
import { Abelito75, carglass, Carrottopp, Otthopsy, bandit } from 'CONTRIBUTORS';
import { SpellLink } from 'interface';

export default [
change(date(2022, 2, 26), <>Change Arms Warrior patch compatibility to 9.2</>, Carrottopp),
change(date(2022, 2, 26), <>Added more abilites into rotational cooldown tracker.</>, Carrottopp),
change(date(2022, 2, 7), <>Updated <SpellLink id={SPELLS.REND_TALENT.id} icon /> and <SpellLink id={SPELLS.MASTERY_DEEP_WOUNDS_DEBUFF.id} icon /> dot refresh modules.</>, Carrottopp),
change(date(2022, 2, 7), <>Updated <SpellLink id={TALENTS.REND_ARMS_TALENT.id} icon /> and <SpellLink id={SPELLS.MASTERY_DEEP_WOUNDS_DEBUFF.id} icon /> dot refresh modules.</>, Carrottopp),
change(date(2022, 2, 5), <>Added a module for better suggestions of <SpellLink id={SPELLS.BLADESTORM.id} icon /> usage.</>, Carrottopp),
change(date(2021, 11, 8), <>Fixed SpellLink issue for Signet Of Tormented Kings.</>, Abelito75),
change(date(2021, 10, 29), <>Initial Arms APL added. (Still WIP)</>, bandit),
Expand Down
16 changes: 8 additions & 8 deletions src/analysis/retail/warrior/arms/CONFIG.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ import Expansion from 'game/Expansion';
import SPECS from 'game/SPECS';
import Config from 'parser/Config';

// import CHANGELOG from './CHANGELOG';
import CHANGELOG from './CHANGELOG';

const config: Config = {
// The people that have contributed to this spec recently. People don't have to sign up to be long-time maintainers to be included in this list. If someone built a large part of the spec or contributed something recently to that spec, they can be added to the contributors list. If someone goes MIA, they may be removed after major changes or during a new expansion.
contributors: [Carrottopp],
expansion: Expansion.Shadowlands,
contributors: [Carrottopp], //-- Note: credit me later when i actually do something.
expansion: Expansion.Dragonflight,
// The WoW client patch this spec was last updated.
patchCompatibility: null,
isPartial: true,
Expand Down Expand Up @@ -42,12 +42,12 @@ const config: Config = {
// The current spec identifier. This is the only place (in code) that specifies which spec this parser is about.
spec: SPECS.ARMS_WARRIOR,
// The contents of your changelog.
changelog: [],
changelog: CHANGELOG,
// The CombatLogParser class for your spec.
// parser: () =>
// import('./CombatLogParser' /* webpackChunkName: "ArmsWarrior" */).then(
// (exports) => exports.default,
// ),
parser: () =>
import('./CombatLogParser' /* webpackChunkName: "ArmsWarrior" */).then(
(exports) => exports.default,
),
// The path to the current directory (relative form project root). This is used for generating a GitHub link directly to your spec's code.
path: __dirname,
};
Expand Down
14 changes: 5 additions & 9 deletions src/analysis/retail/warrior/arms/CombatLogParser.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,14 @@ import CooldownThroughputTracker from './modules/features/CooldownThroughputTrac
import RageDetail from './modules/features/RageDetails';
import RageTracker from './modules/features/RageTracker';
import SpellUsable from './modules/features/SpellUsable';
import SignetOfTormentedKings from './modules/shadowlands/legendaries/SignetOfTormentedKings';
import Talents from './modules/talents';
//import Talents from './modules/talents';
import AngerManagement from './modules/talents/AngerManagement';
import Avatar from './modules/talents/Avatar';
import Cleave from './modules/talents/Cleave';
import DefensiveStance from './modules/talents/DefensiveStance';
import FervorOfBattle from './modules/talents/FervorOfBattle';
import ImpendingVictory from './modules/talents/ImpendingVictory';
import Ravager from './modules/talents/Ravager';
import ImpendingVictory from '../shared/modules/talents/ImpendingVictory';
//import Ravager from './modules/talents/Ravager';
import SecondWind from './modules/talents/SecondWind';
import Skullsplitter from './modules/talents/Skullsplitter';
import StormBolt from './modules/talents/StormBolt';
Expand Down Expand Up @@ -79,7 +78,7 @@ class CombatLogParser extends CoreCombatLogParser {
rendRefreshes: RendRefreshes,

// Talents
talents: Talents,
//talents: Talents,
angerManagement: AngerManagement,
defensiveStance: DefensiveStance,
skullsplitter: Skullsplitter,
Expand All @@ -92,12 +91,9 @@ class CombatLogParser extends CoreCombatLogParser {
cleave: Cleave,
warbreaker: Warbreaker,
avatar: Avatar,
ravager: Ravager,
//ravager: Ravager,
spellReflection: SpellReflection,

// Shadowlands
signetofTormentedKings: SignetOfTormentedKings,

apl: AplCheck,
};
}
Expand Down
11 changes: 6 additions & 5 deletions src/analysis/retail/warrior/arms/modules/core/AplCheck.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import SPELLS from 'common/SPELLS';
import TALENTS from 'common/TALENTS/warrior';
import RESOURCE_TYPES from 'game/RESOURCE_TYPES';
import { suggestion } from 'parser/core/Analyzer';
import aplCheck, { build } from 'parser/shared/metrics/apl';
Expand Down Expand Up @@ -49,26 +50,26 @@ export const apl = build([
{ spell: SPELLS.EXECUTE, condition: cnd.buffPresent(SPELLS.SUDDEN_DEATH_ARMS_TALENT_BUFF) },
// Skull Splitter No Execute: <55 rage and no sudden death
{
spell: SPELLS.SKULLSPLITTER_TALENT,
spell: TALENTS.SKULLSPLITTER_TALENT,
condition: cnd.and(
cnd.hasResource(RESOURCE_TYPES.RAGE, { atMost: 55 }),
cnd.buffMissing(SPELLS.DEADLY_CALM_TALENT),
//cnd.buffMissing(SPELLS.DEADLY_CALM_TALENT),
cnd.not(cnd.inExecute()),
),
},
// Skull Splitter Execute: <45 rage
{
spell: SPELLS.SKULLSPLITTER_TALENT,
spell: TALENTS.SKULLSPLITTER_TALENT,
condition: cnd.and(cnd.hasResource(RESOURCE_TYPES.RAGE, { atMost: 45 }), cnd.inExecute()),
},
SPELLS.OVERPOWER,
SPELLS.MORTAL_STRIKE,
{ spell: SPELLS.WHIRLWIND, condition: cnd.hasTalent(SPELLS.FERVOR_OF_BATTLE_TALENT) },
{ spell: SPELLS.WHIRLWIND, condition: cnd.hasTalent(TALENTS.FERVOR_OF_BATTLE_TALENT) },
{ spell: SPELLS.EXECUTE, condition: cnd.inExecute() },
//not fervor + (rage > 50 / cs debuff / not eb lego)
// this might be a bit much
//SPELLS.SLAM,
{ spell: SPELLS.SLAM, condition: cnd.not(cnd.hasTalent(SPELLS.FERVOR_OF_BATTLE_TALENT)) },
{ spell: SPELLS.SLAM, condition: cnd.not(cnd.hasTalent(TALENTS.FERVOR_OF_BATTLE_TALENT)) },
/* {
spell: SPELLS.SLAM,
condition: cnd.and(
Expand Down
17 changes: 9 additions & 8 deletions src/analysis/retail/warrior/arms/modules/core/Bladestorm.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { t } from '@lingui/macro';
import { formatPercentage } from 'common/format';
import SPELLS from 'common/SPELLS';
import TALENTS from 'common/TALENTS/warrior';
import RESOURCE_TYPES from 'game/RESOURCE_TYPES';
import { SpellLink } from 'interface';
import Analyzer, { SELECTED_PLAYER, Options } from 'parser/core/Analyzer';
Expand Down Expand Up @@ -144,9 +145,9 @@ class Bladestorm extends Analyzer {
// Bladestorm should be aligned with Warbreaker
badCast =
badCast ||
(this.selectedCombatant.hasTalent(SPELLS.WARBREAKER_TALENT) &&
this.spellUsable.isAvailable(SPELLS.WARBREAKER_TALENT.id)) ||
this.spellUsable.cooldownRemaining(SPELLS.WARBREAKER_TALENT.id) < WARBREAKER_FOREGIVENESS;
(this.selectedCombatant.hasTalent(TALENTS.WARBREAKER_TALENT) &&
this.spellUsable.isAvailable(TALENTS.WARBREAKER_TALENT.id)) ||
this.spellUsable.cooldownRemaining(TALENTS.WARBREAKER_TALENT.id) < WARBREAKER_FOREGIVENESS;

if (badCast && !this.currentCast.text) {
this.currentCast.text =
Expand All @@ -156,9 +157,9 @@ class Bladestorm extends Analyzer {
// Bladestorm should be aligned with Avatar
badCast =
badCast ||
(this.selectedCombatant.hasTalent(SPELLS.AVATAR_TALENT) &&
this.spellUsable.isAvailable(SPELLS.AVATAR_TALENT.id)) ||
this.spellUsable.cooldownRemaining(SPELLS.AVATAR_TALENT.id) < AVATAR_FORGIVENESS;
(this.selectedCombatant.hasTalent(TALENTS.AVATAR_TALENT) &&
this.spellUsable.isAvailable(TALENTS.AVATAR_TALENT.id)) ||
this.spellUsable.cooldownRemaining(TALENTS.AVATAR_TALENT.id) < AVATAR_FORGIVENESS;

if (badCast && !this.currentCast.text) {
this.currentCast.text =
Expand All @@ -180,8 +181,8 @@ class Bladestorm extends Analyzer {
Do not cast <SpellLink id={SPELLS.BLADESTORM.id} /> when you have rage to spend during
single target fights. In multi-target situations, Bladestorm should not overlap with{' '}
<SpellLink id={SPELLS.SWEEPING_STRIKES.id} /> and you should try to align Bladestorm with
cooldowns such as <SpellLink id={SPELLS.AVATAR_TALENT.id} /> and{' '}
<SpellLink id={SPELLS.WARBREAKER_TALENT.id} />
cooldowns such as <SpellLink id={TALENTS.AVATAR_TALENT.id} /> and{' '}
<SpellLink id={TALENTS.WARBREAKER_TALENT.id} />
</>,
)
.icon(SPELLS.BLADESTORM.icon)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { t } from '@lingui/macro';
import { formatPercentage } from 'common/format';
import SPELLS from 'common/SPELLS';
import TALENTS from 'common/TALENTS/warrior';
import { SpellLink } from 'interface';
import { CastEvent } from 'parser/core/Events';
import { ThresholdStyle, When } from 'parser/core/ParseResults';
Expand Down Expand Up @@ -59,7 +60,7 @@ class EarlyDotRefresh extends EarlyDotRefreshesCore {
// Refreshes from Colossus Smash/Warbreaker/Bladestorm dont count against you
if (
dot.castId === SPELLS.BLADESTORM.id ||
dot.castId === SPELLS.WARBREAKER_TALENT.id ||
dot.castId === TALENTS.WARBREAKER_TALENT.id ||
dot.castId === SPELLS.COLOSSUS_SMASH.id
) {
this.lastCastGoodExtension = true;
Expand All @@ -70,14 +71,8 @@ class EarlyDotRefresh extends EarlyDotRefreshesCore {
if (
dot &&
dot.castId === SPELLS.MORTAL_STRIKE.id &&
(!this.executeRange.isTargetInExecuteRange({
targetID: event.targetID,
targetInstance: event.targetInstance,
}) ||
(this.executeRange.isTargetInExecuteRange({
targetID: event.targetID,
targetInstance: event.targetInstance,
}) &&
(!this.executeRange.isTargetInExecuteRange(event.targetID || 0, event.targetInstance || 0) ||
(this.executeRange.isTargetInExecuteRange(event.targetID || 0, event.targetInstance || 0) &&
false &&
this.hasTwoOverpowerStacks()))
) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { t } from '@lingui/macro';
import { formatPercentage } from 'common/format';
import SPELLS from 'common/SPELLS';
import TALENTS from 'common/TALENTS/warrior';
import { SpellLink } from 'interface';
import { Options } from 'parser/core/Analyzer';
import { ThresholdStyle, When } from 'parser/core/ParseResults';
Expand All @@ -9,8 +10,8 @@ import EarlyDotRefreshesCore from 'parser/shared/modules/earlydotrefreshes/Early
const DOTS = [
{
name: 'Rend',
debuffId: SPELLS.REND_TALENT.id,
castId: SPELLS.REND_TALENT.id,
debuffId: TALENTS.REND_ARMS_TALENT.id,
castId: TALENTS.REND_ARMS_TALENT.id,
duration: 15000,
},
];
Expand Down Expand Up @@ -40,18 +41,18 @@ class RendAnalyzer extends EarlyDotRefreshesCore {
constructor(options: Options) {
super(options);

this.active = this.selectedCombatant.hasTalent(SPELLS.REND_TALENT);
this.active = this.selectedCombatant.hasTalent(TALENTS.REND_ARMS_TALENT);
}

suggestions(when: When) {
when(this.suggestionThresholdsRendEfficiency).addSuggestion((suggest, actual, recommended) =>
suggest(
<>
You refreshed <SpellLink id={SPELLS.REND_TALENT.id} icon /> early{' '}
You refreshed <SpellLink id={TALENTS.REND_ARMS_TALENT.id} icon /> early{' '}
{this.suggestionThresholdsRendEfficiency.count} times.
</>,
)
.icon(SPELLS.REND_TALENT.icon)
.icon(TALENTS.REND_ARMS_TALENT.icon)
.actual(
t({
id: 'shared.suggestions.dots.badRefreshes',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { t } from '@lingui/macro';
import { formatPercentage } from 'common/format';
import SPELLS from 'common/SPELLS';
import TALENTS from 'common/TALENTS/warrior';
import { SpellIcon, SpellLink } from 'interface';
import Analyzer from 'parser/core/Analyzer';
import { Options } from 'parser/core/EventSubscriber';
Expand All @@ -20,7 +20,7 @@ class RendUptime extends Analyzer {
protected enemies!: Enemies;

get uptime() {
return this.enemies.getBuffUptime(SPELLS.REND_TALENT.id) / this.owner.fightDuration;
return this.enemies.getBuffUptime(TALENTS.REND_ARMS_TALENT.id) / this.owner.fightDuration;
}

get suggestionThresholds() {
Expand All @@ -37,18 +37,18 @@ class RendUptime extends Analyzer {

constructor(options: Options) {
super(options);
this.active = this.selectedCombatant.hasTalent(SPELLS.REND_TALENT);
this.active = this.selectedCombatant.hasTalent(TALENTS.REND_ARMS_TALENT);
}

suggestions(when: When) {
when(this.suggestionThresholds).addSuggestion((suggest, actual, recommended) =>
suggest(
<>
Your <SpellLink id={SPELLS.REND_TALENT.id} /> uptime can be improved. If you choose this
talent, you better use it !
Your <SpellLink id={TALENTS.REND_ARMS_TALENT.id} /> uptime can be improved. If you choose
this talent, you better use it !
</>,
)
.icon(SPELLS.REND_TALENT.icon)
.icon(TALENTS.REND_ARMS_TALENT.icon)
.actual(
t({
id: 'warrior.arms.suggestions.rend.uptime',
Expand All @@ -60,11 +60,11 @@ class RendUptime extends Analyzer {
}

subStatistic() {
const history = this.enemies.getDebuffHistory(SPELLS.REND_TALENT.id);
const history = this.enemies.getDebuffHistory(TALENTS.REND_ARMS_TALENT.id);
return (
<div className="flex">
<div className="flex-sub icon">
<SpellIcon id={SPELLS.REND_TALENT.id} />
<SpellIcon id={TALENTS.REND_ARMS_TALENT.id} />
</div>
<div className="flex-sub value" style={{ width: 140 }}>
{formatPercentage(this.uptime, 0)}% <small>uptime</small>
Expand Down
Loading

0 comments on commit 6a7e8c9

Please sign in to comment.