Grabbed dndbeyond's source code
``` ~/go/bin/sourcemapper -output ddb -jsurl https://media.dndbeyond.com/character-app/static/js/main.90aa78c5.js ```
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
import { HelperUtils } from '../Helper';
|
||||
import { ModifierValidators } from '../Modifier';
|
||||
import { getSpellGroupInfoLookup } from './accessors';
|
||||
import { SpellGroupEnum } from './constants';
|
||||
/**
|
||||
* We needed to display very contextual verbiage for
|
||||
* spells that did damage and the healed based on that
|
||||
* damage on SpellDetail.tsx via SpellCaster.tsx on
|
||||
* the healing node.
|
||||
* - Ask Julie or Brian Life Domain Cleric
|
||||
* @param modifiers
|
||||
* @param spell
|
||||
* @param scaledHealingDie
|
||||
*/
|
||||
export function hack__isHealingDieAdditionalBonusFixedValue(modifiers, spell, scaledHealingDie) {
|
||||
if (!scaledHealingDie) {
|
||||
return false;
|
||||
}
|
||||
const damageModifiers = modifiers.filter((modifier) => ModifierValidators.isSpellDamageModifier(modifier));
|
||||
return (damageModifiers.length > 0 &&
|
||||
HelperUtils.lookupDataOrFallback(getSpellGroupInfoLookup(spell), SpellGroupEnum.HEALING, false) &&
|
||||
!scaledHealingDie.diceValue &&
|
||||
!scaledHealingDie.diceCount &&
|
||||
scaledHealingDie.fixedValue !== null);
|
||||
}
|
||||
Reference in New Issue
Block a user