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 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 // Handle modifiers with multiple buffs
if (mod.dataset.buffs) { if (mod.dataset.buffs) {
const buffs = JSON.parse(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 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 // Handle operative modifiers with multiple buffs
if (mod.buffs) { if (mod.buffs) {
mod.buffs.forEach(buff => { mod.buffs.forEach(buff => {
+10
View File
@@ -119,6 +119,16 @@
"reload_time": 12, "reload_time": 12,
"guntype": "SHOTGUN" "guntype": "SHOTGUN"
}, },
{
"id": 87,
"name": "R870-B",
"damage": 92,
"damage_multiplier": 6,
"rpm": 70,
"mag_size": 12,
"reload_time": 12,
"guntype": "R870-B"
},
{ {
"id": 14, "id": 14,
"name": "Scattergun", "name": "Scattergun",
+27 -20
View File
@@ -5,28 +5,28 @@
"label": "Elite HE Rounds (+14 damage)", "label": "Elite HE Rounds (+14 damage)",
"value": 14, "value": 14,
"type": "additive", "type": "additive",
"operatives": [] "operatives": ""
}, },
{ {
"id": "damage-item-additive-he-rounds", "id": "damage-item-additive-he-rounds",
"label": "HE Rounds (+8 damage)", "label": "HE Rounds (+8 damage)",
"value": 8, "value": 8,
"type": "additive", "type": "additive",
"operatives": [] "operatives": ""
}, },
{ {
"id": "damage-item-multiplicative-strength-mixture", "id": "damage-item-multiplicative-strength-mixture",
"label": "Strength Mixture (+20% damage)", "label": "Strength Mixture (+20% damage)",
"value": 1.2, "value": 1.2,
"type": "multiplicative", "type": "multiplicative",
"operatives": [] "operatives": ""
}, },
{ {
"id": "damage-item-multiplicative-fortunos-necklace", "id": "damage-item-multiplicative-fortunos-necklace",
"label": "Fortunos Necklace (+15% damage)", "label": "Fortunos Necklace (+15% damage)",
"value": 1.15, "value": 1.15,
"type": "multiplicative", "type": "multiplicative",
"operatives": [] "operatives": ""
}, },
{ {
"id": "multiple-buffs-bloxy-cola", "id": "multiple-buffs-bloxy-cola",
@@ -43,21 +43,21 @@
"buffType": "multiplicative" "buffType": "multiplicative"
} }
], ],
"operatives": [] "operatives": ""
}, },
{ {
"id": "damage-item-multiplicative-enhancer", "id": "damage-item-multiplicative-enhancer",
"label": "Enhancer (+10% damage)", "label": "Enhancer (+10% damage)",
"value": 1.1, "value": 1.1,
"type": "multiplicative", "type": "multiplicative",
"operatives": [] "operatives": ""
}, },
{ {
"id": "damage-item-multiplicative-teleport-device", "id": "damage-item-multiplicative-teleport-device",
"label": "Teleport Device (+25% damage)", "label": "Teleport Device (+25% damage)",
"value": 1.25, "value": 1.25,
"type": "multiplicative", "type": "multiplicative",
"operatives": [] "operatives": ""
} }
], ],
"operativePerks": [ "operativePerks": [
@@ -66,28 +66,28 @@
"label": "FBI Badge (+10% Damage)", "label": "FBI Badge (+10% Damage)",
"value": 1.1, "value": 1.1,
"type": "multiplicative", "type": "multiplicative",
"operatives": [] "operatives": "UIU"
}, },
{ {
"id": "damage-perk-multiplicative-anatomy-book", "id": "damage-perk-multiplicative-anatomy-book",
"label": "Anatomy Book (+5% Damage)", "label": "Anatomy Book (+5% Damage)",
"value": 1.05, "value": 1.05,
"type": "multiplicative", "type": "multiplicative",
"operatives": [] "operatives": ""
}, },
{ {
"id": "damage-perk-multiplicative-silly-soldier", "id": "damage-perk-multiplicative-silly-soldier",
"label": "Silly Soldier (+10% Damage)", "label": "Silly Soldier (+10% Damage)",
"value": 1.10, "value": 1.10,
"type": "multiplicative", "type": "multiplicative",
"operatives": [] "operatives": ""
}, },
{ {
"id": "damage-perk-multiplicative-precise-shots", "id": "damage-perk-multiplicative-precise-shots",
"label": "Precise Shots (+15% Damage)", "label": "Precise Shots (+15% Damage)",
"value": 1.40, "value": 1.40,
"type": "multiplicative", "type": "multiplicative",
"operatives": [] "operatives": ""
}, },
{ {
"id": "damage-perk-multiplicative-goc-insignia", "id": "damage-perk-multiplicative-goc-insignia",
@@ -104,7 +104,7 @@
"buffType": "multiplicative" "buffType": "multiplicative"
} }
], ],
"operatives": [] "operatives": "GOC"
} }
], ],
"abilityPerks": [ "abilityPerks": [
@@ -123,19 +123,19 @@
"buffType": "multiplicative" "buffType": "multiplicative"
} }
], ],
"operatives": [] "operatives": ""
}, },
{ {
"id": "damage-ability-multiplicative-heath-spawn", "id": "damage-ability-multiplicative-heath-spawn",
"label": "[All Operatives] Heath Spawn (+30% Damage)", "label": "[All Operatives] Heath Spawn (+30% Damage)",
"value": 1.3, "value": 1.3,
"type": "multiplicative", "type": "multiplicative",
"operatives": [] "operatives": ""
}, },
{ {
"id": "multiple-buffs-warcry", "id": "multiple-buffs-warcry",
"label": "[All Operatives] War Cry(+25% Damage, +?% Reload Speed)", "label": "[All Operatives] War Cry(+25% Damage, +?% Reload Speed)",
"operatives": [], "operatives": "",
"buffs": [ "buffs": [
{ {
"type": "damage", "type": "damage",
@@ -154,35 +154,42 @@
"label": "[All Operatives] Blackout (+30% Damage)", "label": "[All Operatives] Blackout (+30% Damage)",
"value": 1.3, "value": 1.3,
"type": "multiplicative", "type": "multiplicative",
"operatives": [] "operatives": ""
}, },
{ {
"id": "damage-ability-multiplicative-red-scan", "id": "damage-ability-multiplicative-red-scan",
"label": "[All Operatives] Red Scan (+30% Damage)", "label": "[All Operatives] Red Scan (+30% Damage)",
"value": 1.3, "value": 1.3,
"type": "multiplicative", "type": "multiplicative",
"operatives": [] "operatives": ""
}, },
{ {
"id": "damage-ability-multiplicative-red-scan", "id": "damage-ability-multiplicative-red-scan",
"label": "[All Operatives] Green Scan (+50% Damage)", "label": "[All Operatives] Green Scan (+50% Damage)",
"value": 1.5, "value": 1.5,
"type": "multiplicative", "type": "multiplicative",
"operatives": [] "operatives": ""
}, },
{ {
"id": "damage-ability-multiplicative-point-out", "id": "damage-ability-multiplicative-point-out",
"label": "[All Operatives] Point Out (+50% Damage)", "label": "[All Operatives] Point Out (+50% Damage)",
"value": 1.5, "value": 1.5,
"type": "multiplicative", "type": "multiplicative",
"operatives": [] "operatives": ""
}, },
{ {
"id": "damage-item-additive-5-uiu-elite", "id": "damage-item-additive-5-uiu-elite",
"label": "[All Operatives] 5 UIU Elite nearby (+25 damage)", "label": "[All Operatives] 5 UIU Elite nearby (+25 damage)",
"value": 25, "value": 25,
"type": "additive", "type": "additive",
"operatives": [] "operatives": ""
},
{
"id": "damage-item-additive-field-support",
"label": "[All Operatives] MTF Commander Field Support (+8 damage)",
"value": 8,
"type": "additive",
"operatives": ""
} }
] ]
} }
+4 -4
View File
@@ -761,7 +761,7 @@
}, },
{ {
"id": "uiu-detective-secondaries-boost", "id": "uiu-detective-secondaries-boost",
"label": "Moral Boost (+50% Damage)", "label": "Secondaries Boost (+50% Damage)",
"value": 1.5, "value": 1.5,
"type": "multiplicative", "type": "multiplicative",
"appliesTo": "SECONDARY" "appliesTo": "SECONDARY"
@@ -818,7 +818,7 @@
}, },
{ {
"id": "anger-issues-damage-perk", "id": "anger-issues-damage-perk",
"label": "Agression bar (+20% Firerate, +20% Reload Speed)", "label": "Aggression bar (+20% Firerate, +20% Reload Speed)",
"buffs": [ "buffs": [
{ {
"type": "rpm", "type": "rpm",
@@ -852,11 +852,11 @@
}, },
{ {
"id": "bulldozer-time-damage-perk", "id": "bulldozer-time-damage-perk",
"label": "Bulldozer Time Ability (+50% Reload Speed, 50% RPM)", "label": "Bulldozer Time Ability (2x Firerate, 2x Reload Speed)",
"buffs": [ "buffs": [
{ {
"type": "rpm", "type": "rpm",
"value": 1.5, "value": 2,
"buffType": "multiplicative" "buffType": "multiplicative"
}, },
{ {