New source found from dndbeyond.com
This commit is contained in:
+21
-3
@@ -1,4 +1,5 @@
|
||||
import * as React from "react";
|
||||
|
||||
import {
|
||||
AbilityLookup,
|
||||
Attack,
|
||||
@@ -21,15 +22,17 @@ import {
|
||||
} from "@dndbeyond/dice";
|
||||
import StarIcon from "@dndbeyond/fontawesome-cache/svgs/solid/star.svg";
|
||||
import { GameLogContext } from "@dndbeyond/game-log-components";
|
||||
|
||||
import { ItemName } from "~/components/ItemName";
|
||||
import { NumberDisplay } from "~/components/NumberDisplay";
|
||||
import Tooltip from "~/tools/js/commonComponents/Tooltip";
|
||||
|
||||
import Damage from "../../Damage";
|
||||
import { DigitalDiceWrapper } from "../../Dice";
|
||||
import { AttackTypeIcon } from "../../Icons";
|
||||
import NoteComponents from "../../NoteComponents";
|
||||
import { DiceComponentUtils } from "../../utils";
|
||||
import CombatAttack from "../CombatAttack";
|
||||
import { DigitalDiceWrapper } from "../../Dice";
|
||||
import Damage from "../../Damage";
|
||||
|
||||
interface Props {
|
||||
attack: Attack;
|
||||
@@ -130,6 +133,7 @@ class CombatItemAttack extends React.PureComponent<Props, State> {
|
||||
theme,
|
||||
rollContext,
|
||||
className,
|
||||
ruleData,
|
||||
} = this.props;
|
||||
|
||||
const [{ messageTargetOptions, defaultMessageTargetOption, userId }] =
|
||||
@@ -156,6 +160,8 @@ class CombatItemAttack extends React.PureComponent<Props, State> {
|
||||
const isPactWeapon = ItemUtils.isPactWeapon(item);
|
||||
const isDedicatedWeapon = ItemUtils.isDedicatedWeapon(item);
|
||||
const isLegacy = ItemUtils.isLegacy(item);
|
||||
const appliedWeaponReplacementStats =
|
||||
ItemUtils.getAppliedWeaponReplacementStats(item);
|
||||
|
||||
let combinedMetaItems: Array<string> = [];
|
||||
|
||||
@@ -165,7 +171,12 @@ class CombatItemAttack extends React.PureComponent<Props, State> {
|
||||
if (type === Constants.WeaponTypeEnum.AMMUNITION) {
|
||||
combinedMetaItems.push("Ammunition");
|
||||
} else {
|
||||
if (isHexWeapon || isPactWeapon || isDedicatedWeapon) {
|
||||
if (
|
||||
isHexWeapon ||
|
||||
isPactWeapon ||
|
||||
isDedicatedWeapon ||
|
||||
appliedWeaponReplacementStats.length > 0
|
||||
) {
|
||||
if (isHexWeapon) {
|
||||
combinedMetaItems.push("Hex Weapon");
|
||||
}
|
||||
@@ -175,6 +186,13 @@ class CombatItemAttack extends React.PureComponent<Props, State> {
|
||||
if (isDedicatedWeapon) {
|
||||
combinedMetaItems.push("Dedicated Weapon");
|
||||
}
|
||||
if (appliedWeaponReplacementStats.length > 0) {
|
||||
appliedWeaponReplacementStats.forEach((statId) => {
|
||||
combinedMetaItems.push(
|
||||
`Using ${RuleDataUtils.getStatNameById(statId, ruleData, true)}`
|
||||
);
|
||||
});
|
||||
}
|
||||
} else {
|
||||
combinedMetaItems.push(`${attackTypeName} Weapon`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user