refactor: vulnerabilities ->modifiers
This commit is contained in:
parent
20f7ca8853
commit
9f6cae5b9b
|
@ -27,7 +27,7 @@ export class Vulnerable extends Trait {
|
|||
playDamagingSound,
|
||||
],
|
||||
},
|
||||
vulnerabilities: undefined,
|
||||
modifiers: undefined,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -284,9 +284,9 @@ export class Vulnerable extends Trait {
|
|||
const damageSpec = damageSpecs[i];
|
||||
let power = damageSpec.power;
|
||||
// Check if vulnerable to this affinity.
|
||||
if (this.params.vulnerabilities) {
|
||||
if (damageSpec.affinity in this.params.vulnerabilities) {
|
||||
power *= this.params.vulnerabilities[damageSpec.affinity];
|
||||
if (this.params.modifiers) {
|
||||
if (damageSpec.affinity in this.params.modifiers) {
|
||||
power *= this.params.modifiers[damageSpec.affinity];
|
||||
}
|
||||
}
|
||||
if (this.locks.has(damageSpec)) {
|
||||
|
|
|
@ -55,7 +55,7 @@ export function flowerBarrelJSON() {
|
|||
visible: {},
|
||||
vulnerable: {
|
||||
params: {
|
||||
vulnerabilities: {
|
||||
modifiers: {
|
||||
[AFFINITY_FIRE]: 2,
|
||||
[AFFINITY_NONE]: 0,
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue
Block a user