forked from WoWAnalyzer/WoWAnalyzer
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Shadow] Add statistics for several Shadow Talents. (WoWAnalyzer#6747)
* Add PsychicLink statistic * Update PhantasmalPathogen.tsx * Fix PsychicLink Statistic * Add Voidtouched Statistic * Add Mind's Eye Statistic * Add DistortedReality Statistic * Fix statistics to account for free DevouringPlague * Update CHANGELOG.tsx * Add statistic for Maddening Touch * Update Dark Evangelism Statistic * Fix Mistake in PsychicLink All damage of Devouring plague counts towards Psychic link, not just the non periodic part. * Add Statistic for Mind Melt * Add Mastermind Statistic * Update Mastermind.tsx * Fix Mastermind * Minor fixes to new statistics * Update example report * Update mastermind to be clearer * Update != to !== in DR and ME
- Loading branch information
Showing
13 changed files
with
515 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
94 changes: 88 additions & 6 deletions
94
src/analysis/retail/priest/shadow/modules/talents/DarkEvangelism.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
63 changes: 63 additions & 0 deletions
63
src/analysis/retail/priest/shadow/modules/talents/DistortedReality.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
import TALENTS from 'common/TALENTS/priest'; | ||
import Analyzer, { Options, SELECTED_PLAYER } from 'parser/core/Analyzer'; | ||
import { CastEvent, DamageEvent } from 'parser/core/Events'; | ||
import Events from 'parser/core/Events'; | ||
import { calculateEffectiveDamage } from 'parser/core/EventCalculateLib'; | ||
import BoringSpellValueText from 'parser/ui/BoringSpellValueText'; | ||
import ItemDamageDone from 'parser/ui/ItemDamageDone'; | ||
import { formatNumber } from 'common/format'; | ||
import InsanityIcon from 'interface/icons/Insanity'; | ||
import Statistic from 'parser/ui/Statistic'; | ||
import STATISTIC_CATEGORY from 'parser/ui/STATISTIC_CATEGORY'; | ||
|
||
class DistortedReality extends Analyzer { | ||
damage = 0; | ||
insanitySpent = 0; // extra insanity requred to cast spell | ||
multiplierDistortedReality = 0.2; //20% | ||
|
||
constructor(options: Options) { | ||
super(options); | ||
this.active = this.selectedCombatant.hasTalent(TALENTS.DISTORTED_REALITY_TALENT); | ||
this.addEventListener( | ||
Events.damage.by(SELECTED_PLAYER).spell(TALENTS.DEVOURING_PLAGUE_TALENT), | ||
this.onDevouringPlagueDamage, | ||
); | ||
this.addEventListener( | ||
Events.cast.by(SELECTED_PLAYER).spell(TALENTS.DEVOURING_PLAGUE_TALENT), | ||
this.onDevouringPlagueCast, | ||
); | ||
} | ||
|
||
onDevouringPlagueDamage(event: DamageEvent) { | ||
this.damage += calculateEffectiveDamage(event, this.multiplierDistortedReality); | ||
} | ||
|
||
onDevouringPlagueCast(event: CastEvent) { | ||
const resource = event.classResources?.at(0)?.cost; //Some buffs grant free Devouring Plagues, which do not have a resource cost | ||
if (resource !== undefined) { | ||
//If devouring Plague is free, then we have not spent the extra insanity | ||
this.insanitySpent += 5; | ||
} | ||
} | ||
|
||
statistic() { | ||
return ( | ||
<Statistic | ||
category={STATISTIC_CATEGORY.TALENTS} | ||
size="flexible" | ||
tooltip="Amount of extra Insanity used due to the increased cost" | ||
> | ||
<BoringSpellValueText spell={TALENTS.DISTORTED_REALITY_TALENT}> | ||
<div> | ||
<ItemDamageDone amount={this.damage} /> | ||
</div> | ||
<div> | ||
<InsanityIcon /> {formatNumber(this.insanitySpent)} <small> Extra Insanity Cost</small> | ||
</div> | ||
</BoringSpellValueText> | ||
</Statistic> | ||
); | ||
} | ||
} | ||
|
||
export default DistortedReality; |
60 changes: 60 additions & 0 deletions
60
src/analysis/retail/priest/shadow/modules/talents/Maddening Touch.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
import TALENTS from 'common/TALENTS/priest'; | ||
import SPELLS from 'common/SPELLS'; | ||
import Analyzer, { Options, SELECTED_PLAYER } from 'parser/core/Analyzer'; | ||
import { ResourceChangeEvent, DamageEvent } from 'parser/core/Events'; | ||
import Events from 'parser/core/Events'; | ||
import { calculateEffectiveDamage } from 'parser/core/EventCalculateLib'; | ||
import BoringSpellValueText from 'parser/ui/BoringSpellValueText'; | ||
import ItemDamageDone from 'parser/ui/ItemDamageDone'; | ||
import ItemInsanityGained from 'analysis/retail/priest/shadow/interface/ItemInsanityGained'; | ||
import Statistic from 'parser/ui/Statistic'; | ||
import STATISTIC_CATEGORY from 'parser/ui/STATISTIC_CATEGORY'; | ||
|
||
import { MADDENING_TOUCH_DAMAGE_PER_RANK } from '../../constants'; | ||
|
||
class MaddeningTouch extends Analyzer { | ||
damage = 0; | ||
insanityGained = 0; | ||
|
||
multiplierMaddeningTouch = | ||
this.selectedCombatant.getTalentRank(TALENTS.MADDENING_TOUCH_TALENT) * | ||
MADDENING_TOUCH_DAMAGE_PER_RANK; | ||
|
||
constructor(options: Options) { | ||
super(options); | ||
this.active = this.selectedCombatant.hasTalent(TALENTS.MADDENING_TOUCH_TALENT); | ||
this.addEventListener( | ||
Events.damage.by(SELECTED_PLAYER).spell(SPELLS.VAMPIRIC_TOUCH), | ||
this.onVampricTouchDamage, | ||
); | ||
this.addEventListener( | ||
Events.resourcechange.by(SELECTED_PLAYER).spell(SPELLS.MADDENING_TOUCH_RESOURCE), | ||
this.onVampricTouchResource, | ||
); | ||
} | ||
|
||
onVampricTouchDamage(event: DamageEvent) { | ||
this.damage += calculateEffectiveDamage(event, this.multiplierMaddeningTouch); | ||
} | ||
|
||
onVampricTouchResource(event: ResourceChangeEvent) { | ||
this.insanityGained += event.resourceChange - event.waste; | ||
} | ||
|
||
statistic() { | ||
return ( | ||
<Statistic category={STATISTIC_CATEGORY.TALENTS} size="flexible"> | ||
<BoringSpellValueText spell={TALENTS.MADDENING_TOUCH_TALENT}> | ||
<div> | ||
<ItemDamageDone amount={this.damage} /> | ||
</div> | ||
<div> | ||
<ItemInsanityGained amount={this.insanityGained} /> | ||
</div> | ||
</BoringSpellValueText> | ||
</Statistic> | ||
); | ||
} | ||
} | ||
|
||
export default MaddeningTouch; |
Oops, something went wrong.