Skip to content

Commit

Permalink
[Hunter] Add Steel Trap as a shared talent and cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Pewtro committed Oct 3, 2023
1 parent 8b58c6b commit 0dd92ff
Show file tree
Hide file tree
Showing 37 changed files with 159 additions and 334 deletions.
1 change: 1 addition & 0 deletions src/analysis/retail/hunter/beastmastery/CHANGELOG.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import TALENTS from 'common/TALENTS/hunter';
import SPELLS from 'common/SPELLS';
import RESOURCE_TYPES from 'game/RESOURCE_TYPES';
export default [
change(date(2023, 10, 3), <>Add <SpellLink spell={TALENTS.STEEL_TRAP_TALENT} /> as a trackable talent. </>, Putro),
change(date(2023, 7, 29), 'Mark Beast Mastery as compatible for 10.1.5', Putro),
change(date(2023, 7, 3), 'Update SpellLink usage.', ToppleTheNun),
change(date(2023, 7, 3), 'Added support for Tier 30 2piece and 4piece', Putro),
Expand Down
4 changes: 3 additions & 1 deletion src/analysis/retail/hunter/beastmastery/CombatLogParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ import {
WailingArrow,
WailingArrowPrepullNormalizer,
TranquilizingShot,
} from 'analysis/retail/hunter/shared';
SteelTrap,
} from '../shared';
import CoreCombatLogParser from 'parser/core/CombatLogParser';
import Abilities from './modules/Abilities';
import Buffs from './modules/Buffs';
Expand Down Expand Up @@ -127,6 +128,7 @@ class CombatLogParser extends CoreCombatLogParser {
bloodshed: Bloodshed,
direPack: DirePack,
tranquilizingShot: TranquilizingShot,
steeltrap: SteelTrap,

//Items
t292p: T29BMTier2P,
Expand Down
6 changes: 3 additions & 3 deletions src/analysis/retail/hunter/beastmastery/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,11 @@ export const BASE_BM_FOCUS_REGEN = 5;
//Beast Mastery has 120 focus at start
export const BASE_BM_FOCUS_MAX = 100;
//Minor threshold for focus wastage on focus generators
export const FOCUS_THRESHOLD_MINOR = 0.025;
export const FOCUS_THRESHOLD_MINOR = 0.05;
//Average threshold for focus wastage on focus generators
export const FOCUS_THRESHOLD_AVG = 0.05;
export const FOCUS_THRESHOLD_AVG = 0.075;
//Major threshold for focus wastage on focus generators
export const FOCUS_THRESHOLD_MAJOR = 0.1;
export const FOCUS_THRESHOLD_MAJOR = 0.125;
//The 8 focus regen buffs connected to Barbed Shot
export const BARBED_SHOT_FOCUS_REGEN_BUFFS = [
SPELLS.BARBED_SHOT_BUFF,
Expand Down
13 changes: 13 additions & 0 deletions src/analysis/retail/hunter/beastmastery/modules/Abilities.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,19 @@ class Abilities extends CoreAbilities {
recommendedEfficiency: 0.9,
},
},
{
spell: TALENTS.STEEL_TRAP_TALENT.id,
category: SPELL_CATEGORY.ROTATIONAL,
cooldown: 30,
enabled: combatant.hasTalent(TALENTS.STEEL_TRAP_TALENT),
gcd: {
base: 1500,
},
castEfficiency: {
suggestion: true,
recommendedEfficiency: 0.85,
},
},
//endregion

//region Baseline Defensives
Expand Down
1 change: 1 addition & 0 deletions src/analysis/retail/hunter/marksmanship/CHANGELOG.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { ItemLink, SpellLink } from 'interface';
import TALENTS from 'common/TALENTS/hunter';
import ITEMS from 'common/ITEMS';
export default [
change(date(2023, 10, 3), <>Add <SpellLink spell={TALENTS.STEEL_TRAP_TALENT} /> as a trackable talent. </>, Putro),
change(date(2023, 7, 3), 'Update SpellLink usage.', ToppleTheNun),
change(date(2023, 6, 4), <>Add <ItemLink id={ITEMS.CALL_TO_DOMINANCE.id}/> module to hunter</>, Trevor),
change(date(2023, 5, 9), <>Added support for T29 tier sets</>, Swolorno),
Expand Down
40 changes: 19 additions & 21 deletions src/analysis/retail/hunter/marksmanship/CombatLogParser.ts
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
import {
Channeling,
DeathTracker,
NaturalMending,
Trailblazer,
Barrage,
AMurderOfCrows,
BornToBeWild,
Barrage,
BindingShot,
KillShot,
FocusTracker,
FocusDetails,
SpellFocusCost,
BornToBeWild,
CancelledCasts,
Channeling,
DeathChakrams,
DeathTracker,
FocusDetails,
FocusTracker,
KillShot,
NaturalMending,
RejuvenatingWind,
CancelledCasts,
SpellFocusCost,
SteelTrap,
Trailblazer,
TranquilizingShot,
WailingArrow,
WailingArrowPrepullNormalizer,
TranquilizingShot,
} from 'analysis/retail/hunter/shared';
} from '../shared';
import CoreCombatLogParser from 'parser/core/CombatLogParser';
import ArcaneTorrent from 'parser/shared/modules/racials/bloodelf/ArcaneTorrent';

import Abilities from './modules/Abilities';
import AplCheck from './modules/apl/AplCheck';
import Buffs from './modules/Buffs';
import Checklist from './modules/checklist/Module';
import GlobalCooldown from './modules/core/GlobalCooldown';
Expand All @@ -35,7 +35,7 @@ import SurgingShots from './modules/talents/SurgingShots';
import Focus from './modules/resources/Focus';
import MarksmanshipFocusCapTracker from './modules/resources/MarksmanshipFocusCapTracker';
import MarksmanshipFocusUsage from './modules/resources/MarksmanshipFocusUsage';
import AimedShot from './modules/spells/AimedShot';
import AimedShot from './modules/talents/AimedShot';
import LoneWolf from './modules/spells/LoneWolf';
import PreciseShots from './modules/spells/PreciseShots';
import RapidFire from './modules/spells/RapidFire';
Expand Down Expand Up @@ -90,18 +90,16 @@ class CombatLogParser extends CoreCombatLogParser {
trueshot: Trueshot,
loneWolf: LoneWolf,
preciseShots: PreciseShots,
aimedShot: AimedShot,
rapidFire: RapidFire,
steadyShot: SteadyShot,
killShot: KillShot,
bindingShot: BindingShot,

//Talents
aimedShot: AimedShot,
volley: Volley,
lockAndLoad: LockAndLoad,
barrage: Barrage,
callingTheShots: CallingTheShots,
serpentSting: SerpentSting,
steadyFocus: SteadyFocus,
carefulAim: CarefulAim,
chimaeraShot: ChimaeraShot,
Expand All @@ -122,16 +120,16 @@ class CombatLogParser extends CoreCombatLogParser {
explosiveShot: ExplosiveShot,
masterMarksman: MasterMarksman,
wailingArrow: WailingArrow,
steelTrap: SteelTrap,
serpentSting: SerpentSting,
barrage: Barrage,

// items
t292p: T29MMTier2P,
t294p: T29MMTier4P,

// There's no throughput benefit from casting Arcane Torrent on cooldown
arcaneTorrent: [ArcaneTorrent, { castEfficiency: null }] as const,

// apl
apl: AplCheck,
};
}

Expand Down
2 changes: 1 addition & 1 deletion src/analysis/retail/hunter/marksmanship/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export const START_LONE_WOLF_MODIFIER = 0;
export const LONE_WOLF_AFFECTED_SPELLS = [
SPELLS.AUTO_SHOT,
SPELLS.MULTISHOT_MM,
SPELLS.AIMED_SHOT,
TALENTS.AIMED_SHOT_TALENT,
SPELLS.STEADY_SHOT,
TALENTS.BARRAGE_TALENT,
SPELLS.A_MURDER_OF_CROWS_DEBUFF,
Expand Down
16 changes: 15 additions & 1 deletion src/analysis/retail/hunter/marksmanship/modules/Abilities.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ class Abilities extends CoreAbilities {
*/
//region Baseline Rotational
{
spell: SPELLS.AIMED_SHOT.id,
spell: TALENTS.AIMED_SHOT_TALENT.id,
enabled: this.selectedCombatant.hasTalent(TALENTS.AIMED_SHOT_TALENT),
category: SPELL_CATEGORY.ROTATIONAL,
cooldown: (haste: number) => 12 / (1 + haste),
charges: 2,
Expand Down Expand Up @@ -163,6 +164,19 @@ class Abilities extends CoreAbilities {
base: 1500,
},
},
{
spell: TALENTS.STEEL_TRAP_TALENT.id,
category: SPELL_CATEGORY.ROTATIONAL,
cooldown: 30,
enabled: combatant.hasTalent(TALENTS.STEEL_TRAP_TALENT),
gcd: {
base: 1500,
},
castEfficiency: {
suggestion: true,
recommendedEfficiency: 0.85,
},
},
//endregion

//region Baseline Defensives
Expand Down
2 changes: 1 addition & 1 deletion src/analysis/retail/hunter/marksmanship/modules/Buffs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class Buffs extends CoreAuras {
{
spellId: SPELLS.PRECISE_SHOTS.id,
timelineHighlight: true,
triggeredBySpellId: SPELLS.AIMED_SHOT.id,
triggeredBySpellId: TALENTS_HUNTER.AIMED_SHOT_TALENT.id,
},
{
spellId: SPELLS.LOCK_AND_LOAD_BUFF.id,
Expand Down
120 changes: 0 additions & 120 deletions src/analysis/retail/hunter/marksmanship/modules/apl/AplCheck.tsx

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import SPELLS from 'common/SPELLS';
import { TALENTS_HUNTER } from 'common/TALENTS';
import { SpellLink } from 'interface';
import PreparationRule from 'parser/retail/modules/features/Checklist/PreparationRule';
import AplRule, { AplRuleProps } from 'parser/shared/metrics/apl/ChecklistRule';
import Checklist from 'parser/shared/modules/features/Checklist';
import {
AbilityRequirementProps,
Expand All @@ -13,7 +12,7 @@ import Requirement from 'parser/shared/modules/features/Checklist/Requirement';
import Rule from 'parser/shared/modules/features/Checklist/Rule';
import TalentCastEfficiencyRequirement from 'parser/shared/modules/features/Checklist/TalentCastEfficiencyRequirement';

const MarksmanshipChecklist = (props: ChecklistProps & AplRuleProps) => {
const MarksmanshipChecklist = (props: ChecklistProps) => {
const { combatant, castEfficiency, thresholds } = props;
const AbilityRequirement = (props: AbilityRequirementProps) => (
<GenericCastEfficiencyRequirement
Expand Down Expand Up @@ -43,7 +42,7 @@ const MarksmanshipChecklist = (props: ChecklistProps & AplRuleProps) => {
</>
}
>
<AbilityRequirement spell={SPELLS.AIMED_SHOT.id} />
<TalentCastEfficiencyRequirement talent={TALENTS_HUNTER.AIMED_SHOT_TALENT} />
<AbilityRequirement spell={SPELLS.RAPID_FIRE.id} />
<AbilityRequirement spell={SPELLS.TRUESHOT.id} />
<TalentCastEfficiencyRequirement talent={TALENTS_HUNTER.KILL_SHOT_SHARED_TALENT} />
Expand Down Expand Up @@ -155,7 +154,6 @@ const MarksmanshipChecklist = (props: ChecklistProps & AplRuleProps) => {
/>
</Rule>

<AplRule {...props} name="APL checker (beta)" cooldowns={[TALENTS_HUNTER.TRUESHOT_TALENT]} />
<PreparationRule thresholds={thresholds} />
</Checklist>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import CastEfficiency from 'parser/shared/modules/CastEfficiency';
import Combatants from 'parser/shared/modules/Combatants';
import BaseChecklist from 'parser/shared/modules/features/Checklist/Module';

import { apl, check as aplCheck } from '../apl/AplCheck';
import AlwaysBeCasting from '../features/AlwaysBeCasting';
import Component from './Component';

Expand Down Expand Up @@ -65,11 +64,8 @@ class Checklist extends BaseChecklist {
//endregion

render() {
const checkResults = aplCheck(this.owner.eventHistory, this.owner.info);
return (
<Component
apl={apl}
checkResults={checkResults}
combatant={this.combatants.selected}
castEfficiency={this.castEfficiency}
thresholds={{
Expand Down
Loading

0 comments on commit 0dd92ff

Please sign in to comment.