refactor: vulnerabilities ->modifiers
This commit is contained in:
parent
20f7ca8853
commit
9f6cae5b9b
|
@ -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)) {
|
||||||
|
|
|
@ -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,
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue
Block a user