From 7eca20e2625690b6f84c338588ae2e25d85be74d Mon Sep 17 00:00:00 2001 From: IM23a-spirgif Date: Thu, 19 Sep 2024 18:12:14 +0200 Subject: [PATCH] expanded on operatives --- static/filterWeapons.js | 9 ++++++++ static/json/data.json | 10 ++++++++ static/json/modifiers.json | 47 ++++++++++++++++++++++---------------- static/json/operative.json | 8 +++---- 4 files changed, 50 insertions(+), 24 deletions(-) diff --git a/static/filterWeapons.js b/static/filterWeapons.js index 166505f..d9f6894 100644 --- a/static/filterWeapons.js +++ b/static/filterWeapons.js @@ -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 => { diff --git a/static/json/data.json b/static/json/data.json index b5b36bc..5f0d167 100644 --- a/static/json/data.json +++ b/static/json/data.json @@ -119,6 +119,16 @@ "reload_time": 12, "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, "name": "Scattergun", diff --git a/static/json/modifiers.json b/static/json/modifiers.json index 140b8a9..0974533 100644 --- a/static/json/modifiers.json +++ b/static/json/modifiers.json @@ -5,28 +5,28 @@ "label": "Elite HE Rounds (+14 damage)", "value": 14, "type": "additive", - "operatives": [] + "operatives": "" }, { "id": "damage-item-additive-he-rounds", "label": "HE Rounds (+8 damage)", "value": 8, "type": "additive", - "operatives": [] + "operatives": "" }, { "id": "damage-item-multiplicative-strength-mixture", "label": "Strength Mixture (+20% damage)", "value": 1.2, "type": "multiplicative", - "operatives": [] + "operatives": "" }, { "id": "damage-item-multiplicative-fortunos-necklace", "label": "Fortunos Necklace (+15% damage)", "value": 1.15, "type": "multiplicative", - "operatives": [] + "operatives": "" }, { "id": "multiple-buffs-bloxy-cola", @@ -43,21 +43,21 @@ "buffType": "multiplicative" } ], - "operatives": [] + "operatives": "" }, { "id": "damage-item-multiplicative-enhancer", "label": "Enhancer (+10% damage)", "value": 1.1, "type": "multiplicative", - "operatives": [] + "operatives": "" }, { "id": "damage-item-multiplicative-teleport-device", "label": "Teleport Device (+25% damage)", "value": 1.25, "type": "multiplicative", - "operatives": [] + "operatives": "" } ], "operativePerks": [ @@ -66,28 +66,28 @@ "label": "FBI Badge (+10% Damage)", "value": 1.1, "type": "multiplicative", - "operatives": [] + "operatives": "UIU" }, { "id": "damage-perk-multiplicative-anatomy-book", "label": "Anatomy Book (+5% Damage)", "value": 1.05, "type": "multiplicative", - "operatives": [] + "operatives": "" }, { "id": "damage-perk-multiplicative-silly-soldier", "label": "Silly Soldier (+10% Damage)", "value": 1.10, "type": "multiplicative", - "operatives": [] + "operatives": "" }, { "id": "damage-perk-multiplicative-precise-shots", "label": "Precise Shots (+15% Damage)", "value": 1.40, "type": "multiplicative", - "operatives": [] + "operatives": "" }, { "id": "damage-perk-multiplicative-goc-insignia", @@ -104,7 +104,7 @@ "buffType": "multiplicative" } ], - "operatives": [] + "operatives": "GOC" } ], "abilityPerks": [ @@ -123,19 +123,19 @@ "buffType": "multiplicative" } ], - "operatives": [] + "operatives": "" }, { "id": "damage-ability-multiplicative-heath-spawn", "label": "[All Operatives] Heath Spawn (+30% Damage)", "value": 1.3, "type": "multiplicative", - "operatives": [] + "operatives": "" }, { "id": "multiple-buffs-warcry", "label": "[All Operatives] War Cry(+25% Damage, +?% Reload Speed)", - "operatives": [], + "operatives": "", "buffs": [ { "type": "damage", @@ -154,35 +154,42 @@ "label": "[All Operatives] Blackout (+30% Damage)", "value": 1.3, "type": "multiplicative", - "operatives": [] + "operatives": "" }, { "id": "damage-ability-multiplicative-red-scan", "label": "[All Operatives] Red Scan (+30% Damage)", "value": 1.3, "type": "multiplicative", - "operatives": [] + "operatives": "" }, { "id": "damage-ability-multiplicative-red-scan", "label": "[All Operatives] Green Scan (+50% Damage)", "value": 1.5, "type": "multiplicative", - "operatives": [] + "operatives": "" }, { "id": "damage-ability-multiplicative-point-out", "label": "[All Operatives] Point Out (+50% Damage)", "value": 1.5, "type": "multiplicative", - "operatives": [] + "operatives": "" }, { "id": "damage-item-additive-5-uiu-elite", "label": "[All Operatives] 5 UIU Elite nearby (+25 damage)", "value": 25, "type": "additive", - "operatives": [] + "operatives": "" + }, + { + "id": "damage-item-additive-field-support", + "label": "[All Operatives] MTF Commander Field Support (+8 damage)", + "value": 8, + "type": "additive", + "operatives": "" } ] } diff --git a/static/json/operative.json b/static/json/operative.json index e17b82a..12b4ac6 100644 --- a/static/json/operative.json +++ b/static/json/operative.json @@ -761,7 +761,7 @@ }, { "id": "uiu-detective-secondaries-boost", - "label": "Moral Boost (+50% Damage)", + "label": "Secondaries Boost (+50% Damage)", "value": 1.5, "type": "multiplicative", "appliesTo": "SECONDARY" @@ -818,7 +818,7 @@ }, { "id": "anger-issues-damage-perk", - "label": "Agression bar (+20% Firerate, +20% Reload Speed)", + "label": "Aggression bar (+20% Firerate, +20% Reload Speed)", "buffs": [ { "type": "rpm", @@ -852,11 +852,11 @@ }, { "id": "bulldozer-time-damage-perk", - "label": "Bulldozer Time Ability (+50% Reload Speed, 50% RPM)", + "label": "Bulldozer Time Ability (2x Firerate, 2x Reload Speed)", "buffs": [ { "type": "rpm", - "value": 1.5, + "value": 2, "buffType": "multiplicative" }, {