refactor: vulnerabilities ->modifiers

This commit is contained in:
cha0s 2019-11-24 06:14:43 -06:00
parent 20f7ca8853
commit 9f6cae5b9b
2 changed files with 5 additions and 5 deletions

View File

@ -27,7 +27,7 @@ export class Vulnerable extends Trait {
playDamagingSound, playDamagingSound,
], ],
}, },
vulnerabilities: undefined, modifiers: undefined,
} }
} }
@ -284,9 +284,9 @@ export class Vulnerable extends Trait {
const damageSpec = damageSpecs[i]; const damageSpec = damageSpecs[i];
let power = damageSpec.power; let power = damageSpec.power;
// Check if vulnerable to this affinity. // Check if vulnerable to this affinity.
if (this.params.vulnerabilities) { if (this.params.modifiers) {
if (damageSpec.affinity in this.params.vulnerabilities) { if (damageSpec.affinity in this.params.modifiers) {
power *= this.params.vulnerabilities[damageSpec.affinity]; power *= this.params.modifiers[damageSpec.affinity];
} }
} }
if (this.locks.has(damageSpec)) { if (this.locks.has(damageSpec)) {

View File

@ -55,7 +55,7 @@ export function flowerBarrelJSON() {
visible: {}, visible: {},
vulnerable: { vulnerable: {
params: { params: {
vulnerabilities: { modifiers: {
[AFFINITY_FIRE]: 2, [AFFINITY_FIRE]: 2,
[AFFINITY_NONE]: 0, [AFFINITY_NONE]: 0,
}, },