Added "extra" damage type

Takes on the same damage type as the last damage applied during the
same action, otherwise deals "extra" damage
This commit is contained in:
Stefan Zermatten
2022-07-24 20:38:42 +02:00
parent 27a21aed59
commit a0c2822dac
5 changed files with 37 additions and 20 deletions

View File

@@ -0,0 +1,17 @@
export default function getEffectivePropTags(prop) {
if (!prop.tags) return [];
const tags = [...prop.tags];
// Tags for the property type, separate #damage from #healing
if (prop.type === 'damage' && prop.damageType === 'healing') {
tags.push('#healing');
} else {
tags.push(`#${prop.type}`);
}
// Tags for some string properties
if (prop.damageType) tags.push(prop.damageType);
if (prop.skillType) tags.push(prop.skillType);
if (prop.attributeType) tags.push(prop.attributeType);
if (prop.reset) tags.push(prop.reset);
return tags;
}