expanded on operatives

This commit is contained in:
IM23a-spirgif
2024-09-19 18:12:14 +02:00
parent 4d068ca7a6
commit 7eca20e262
4 changed files with 50 additions and 24 deletions
+9
View File
@@ -210,6 +210,11 @@ function applyModifiers() {
return; // Skip this modifier
}
// If modifier is operative-specific, ensure the selected operative matches the modifier category
if (mod.operatives && selectedOperative && mod.operatives !== selectedOperative.category) {
return; // Skip this modifier if it doesn't apply to the current operative's category
}
// Handle modifiers with multiple buffs
if (mod.dataset.buffs) {
const buffs = JSON.parse(mod.dataset.buffs);
@@ -246,6 +251,10 @@ function applyModifiers() {
return; // Skip if the modifier does not apply to this weapon type
}
if (mod.operatives && selectedOperative && mod.operatives !== selectedOperative.category) {
return; // Skip this modifier if it doesn't apply to the current operative's category
}
// Handle operative modifiers with multiple buffs
if (mod.buffs) {
mod.buffs.forEach(buff => {