New source found from dndbeyond.com

This commit is contained in:
2026-07-08 01:00:09 -07:00
parent 9a983a6d7b
commit dcefa0d2f2
2865 changed files with 222467 additions and 49053 deletions
@@ -1,9 +1,11 @@
import { orderBy } from 'lodash';
import { TypeScriptUtils } from '../../utils';
import { ActionAccessors } from '../Action';
import { PartyRestrictionTypeEnum } from '../Campaign';
import { ContainerValidators } from '../Container';
import { ItemPlanAccessors } from '../ItemPlan';
import { ValueHacks, ValueUtils } from '../Value';
import { canAttune, getArmorTypeId, getAttackType, getBaseItemId, getBaseType, getBaseTypeId, getContainerDefinitionKey, getGearTypeId, getItemWeaponBehaviors, getMappingEntityTypeId, getMappingId, getMasteryName, getName, getPrimarySourceCategoryId, getProperties, getRarity, getSecondarySourceCategoryIds, isAttuned, isContainer, } from './accessors';
import { canAttune, getArmorTypeId, getAttackType, getBaseItemId, getBaseType, getBaseTypeId, getContainerDefinitionKey, getDefinition, getGearTypeId, getItemWeaponBehaviors, getMappingEntityTypeId, getMappingId, getMasteryName, getName, getOriginDefinitionKey, getPartyInventoryRestrictions, getPrimarySourceCategoryId, getProperties, getRarity, getSecondarySourceCategoryIds, isAttuned, isContainer, } from './accessors';
import { ArmorTypeEnum, ItemBaseTypeEnum, ItemBaseTypeIdEnum, ItemRarityNameEnum, ItemTypeEnum, } from './constants';
//TODO probably move alot of these to validators and validate naming :)
export function isShield(armor) {
@@ -177,3 +179,15 @@ export function getMasteryAction(item, actions) {
export function getAllSourceCategoryIds(item) {
return [getPrimarySourceCategoryId(item), ...getSecondarySourceCategoryIds(item)];
}
/// Returns the item plan for the given item if it exists in the provided item plans.
export function getItemPlan(item, itemPlans) {
return (itemPlans.find((plan) => {
var _a;
return ((_a = getDefinition(item)) === null || _a === void 0 ? void 0 : _a.definitionKey) === ItemPlanAccessors.getItemDefinitionKey(plan) &&
getOriginDefinitionKey(item) === ItemPlanAccessors.getOriginDefinitionKey(plan);
}) || null);
}
export function isReplicated(item) {
const partyRestrictions = getPartyInventoryRestrictions(item);
return partyRestrictions.some((restriction) => restriction.type === PartyRestrictionTypeEnum.REPLICATED);
}