diff --git a/app.py b/app.py index ba63391..a87ef3e 100644 --- a/app.py +++ b/app.py @@ -3,42 +3,12 @@ import json app = Flask(__name__) -# Load the data from the JSON file -with open('static/data.json') as f: - guns = json.load(f) - @app.route('/') def index(): return render_template('index.html') -@app.route('/api/guns', methods=['GET']) -def get_guns(): - updated_guns = [] - for gun in guns: - original_damage = gun['damage'] - # Calculate RPS, DPS, DPM, avgDPS - rps = gun['rpm'] / 60 - dps = original_damage * rps - reload_time_min = gun['reload_time'] / 60 - dpm = (gun['mag_size'] * original_damage) / (reload_time_min + (gun['mag_size'] / gun['rpm'])) - avg_dps = dpm / 60 - total_damage = original_damage * gun['damage_multiplier'] - - # Add calculated stats to the gun data - gun.update({ - 'total_damage': total_damage, - 'rps': rps, - 'dps': dps, - 'dpm': dpm, - 'avg_dps': avg_dps - }) - updated_guns.append(gun) - - return jsonify(updated_guns) - - @app.route('/calculator') def calculator(): return render_template('calculator.html') @@ -53,5 +23,6 @@ def about_us(): def suggestion(): return render_template('suggestion.html') + if __name__ == '__main__': app.run(debug=True) diff --git a/static/data.json b/static/json/data.json similarity index 76% rename from static/data.json rename to static/json/data.json index b5b36bc..a1e5e60 100644 --- a/static/data.json +++ b/static/json/data.json @@ -2,52 +2,52 @@ { "id": 1, "name": "G18", - "damage": 32, + "damage": 34, "damage_multiplier": 1, - "rpm": 550, - "mag_size": 18, + "rpm": 800, + "mag_size": 17, "reload_time": 2, - "guntype": "PISTOL" + "guntype": ["PISTOL", "SECONDARY"] }, { "id": 2, "name": "M1911", - "damage": 37, + "damage": 45, "damage_multiplier": 1, "rpm": 580, "mag_size": 8, "reload_time": 1.15, - "guntype": "PISTOL" + "guntype": ["PISTOL", "SECONDARY", "WW2"] }, { "id": 3, "name": "M9A", - "damage": 31, + "damage": 65, "damage_multiplier": 1, - "rpm": 850, + "rpm": 300, "mag_size": 15, "reload_time": 2, - "guntype": "PISTOL" + "guntype": ["PISTOL", "SECONDARY"] }, { "id": 4, "name": "M1911MK2", - "damage": 48, + "damage": 60, "damage_multiplier": 1, "rpm": 720, "mag_size": 16, "reload_time": 3, - "guntype": "PISTOL" + "guntype": ["PISTOL", "SECONDARY"] }, { "id": 5, "name": "Luger", - "damage": 58, + "damage": 150, "damage_multiplier": 1, "rpm": 500, "mag_size": 8, "reload_time": 1.95, - "guntype": "PISTOL" + "guntype": ["PISTOL", "WW2", "SECONDARY"] }, { "id": 6, @@ -57,7 +57,7 @@ "rpm": 600, "mag_size": 30, "reload_time": 2.1, - "guntype": "RIFLE" + "guntype": ["RIFLE", "PRIMARY","SOVIET"] }, { "id": 7, @@ -67,7 +67,7 @@ "rpm": 700, "mag_size": 30, "reload_time": 2.4, - "guntype": "RIFLE" + "guntype": ["RIFLE", "PRIMARY"] }, { "id": 8, @@ -77,7 +77,7 @@ "rpm": 400, "mag_size": 24, "reload_time": 2.6, - "guntype": "RIFLE" + "guntype": ["RIFLE", "SEMI-AUTO", "PRIMARY"] }, { "id": 9, @@ -87,7 +87,7 @@ "rpm": 670, "mag_size": 30, "reload_time": 3.25, - "guntype": "RIFLE" + "guntype": ["RIFLE", "PRIMARY"] }, { "id": 10, @@ -97,7 +97,7 @@ "rpm": 700, "mag_size": 30, "reload_time": 2.35, - "guntype": "RIFLE" + "guntype": ["RIFLE", "PRIMARY"] }, { "id": 11, @@ -107,7 +107,7 @@ "rpm": 60, "mag_size": 8, "reload_time": 2.8, - "guntype": "RIFLE" + "guntype": ["RIFLE", "SEMI-AUTO", "PRIMARY"] }, { "id": 12, @@ -117,7 +117,17 @@ "rpm": 70, "mag_size": 12, "reload_time": 12, - "guntype": "SHOTGUN" + "guntype": ["SHOTGUN", "PRIMARY"] + }, + { + "id": 87, + "name": "R870-B", + "damage": 92, + "damage_multiplier": 6, + "rpm": 70, + "mag_size": 12, + "reload_time": 12, + "guntype": ["SHOTGUN", "PRIMARY"] }, { "id": 14, @@ -126,18 +136,18 @@ "damage_multiplier": 4, "rpm": 300, "mag_size": 7, - "reload_time": 4, - "guntype": "SHOTGUN" + "reload_time": 4.5, + "guntype": ["SHOTGUN", "PRIMARY"] }, { "id": 16, "name": "Shorty", - "damage": 29, + "damage": 40, "damage_multiplier": 4, - "rpm": 185, + "rpm": 150, "mag_size": 8, "reload_time": 3.5, - "guntype": "SHOTGUN" + "guntype": ["SHOTGUN", "SECONDARY"] }, { "id": 18, @@ -147,7 +157,7 @@ "rpm": 300, "mag_size": 20, "reload_time": 2.2, - "guntype": "SHOTGUN" + "guntype": ["SHOTGUN", "PRIMARY"] }, { "id": 20, @@ -157,7 +167,7 @@ "rpm": 900, "mag_size": 50, "reload_time": 3, - "guntype": "SMG" + "guntype": ["SMG", "PRIMARY"] }, { "id": 21, @@ -167,17 +177,17 @@ "rpm": 750, "mag_size": 50, "reload_time": 2.5, - "guntype": "SMG" + "guntype": ["SMG", "PRIMARY", "WW2"] }, { "id": 22, "name": "Uzi", - "damage": 20, + "damage": 32, "damage_multiplier": 1, - "rpm": 850, - "mag_size": 32, + "rpm": 950, + "mag_size": 20, "reload_time": 2, - "guntype": "SMG" + "guntype": ["SMG", "SECONDARY"] }, { "id": 23, @@ -187,67 +197,67 @@ "rpm": 1050, "mag_size": 33, "reload_time": 2, - "guntype": "SMG" + "guntype": ["SMG", "PRIMARY"] }, { "id": 24, "name": "MP5", - "damage": 23, + "damage": 26, "damage_multiplier": 1, "rpm": 800, "mag_size": 30, "reload_time": 2.1, - "guntype": "SMG" + "guntype": ["SMG", "SECONDARY"] }, { "id": 25, "name": "U10", - "damage": 18, + "damage": 22, "damage_multiplier": 1, "rpm": 750, "mag_size": 65, "reload_time": 2, - "guntype": "SMG" + "guntype": ["SMG", "SECONDARY"] }, { "id": 26, "name": "MPX", - "damage": 28, + "damage": 36, "damage_multiplier": 1, "rpm": 780, "mag_size": 30, "reload_time": 2.65, - "guntype": "SMG" + "guntype": ["SMG", "SECONDARY"] }, { "id": 27, "name": "UMP45", - "damage": 28, + "damage": 36, "damage_multiplier": 1, "rpm": 600, "mag_size": 25, "reload_time": 2, - "guntype": "SMG" + "guntype": ["SMG", "SECONDARY"] }, { "id": 28, "name": "Prototype", - "damage": 21, + "damage": 28, "damage_multiplier": 1, "rpm": 800, "mag_size": 25, "reload_time": 2.5, - "guntype": "SMG" + "guntype": ["SMG", "SECONDARY"] }, { "id": 29, "name": "Prototype (Overcharged)", - "damage": 21, + "damage": 28, "damage_multiplier": 1.35, "rpm": 800, "mag_size": 25, "reload_time": 2.5, - "guntype": "SMG" + "guntype": ["SMG", "SECONDARY"] }, { "id": 30, @@ -257,7 +267,7 @@ "rpm": 550, "mag_size": 32, "reload_time": 3, - "guntype": "SMG" + "guntype": ["SMG", "PRIMARY", "WW2"] }, { "id": 31, @@ -267,7 +277,7 @@ "rpm": 750, "mag_size": 100, "reload_time": 5.5, - "guntype": "LMG" + "guntype": ["LMG", "PRIMARY","SOVIET"] }, { "id": 32, @@ -277,7 +287,7 @@ "rpm": 850, "mag_size": 100, "reload_time": 6, - "guntype": "LMG" + "guntype": ["LMG", "PRIMARY"] }, { "id": 33, @@ -287,7 +297,7 @@ "rpm": 780, "mag_size": 125, "reload_time": 5.5, - "guntype": "LMG" + "guntype": ["LMG", "PRIMARY"] }, { "id": 34, @@ -297,7 +307,7 @@ "rpm": 700, "mag_size": 50, "reload_time": 3.25, - "guntype": "RIFLE" + "guntype": ["RIFLE", "PRIMARY"] }, { "id": 35, @@ -307,7 +317,7 @@ "rpm": 850, "mag_size": 125, "reload_time": 5.5, - "guntype": "LMG" + "guntype": ["LMG", "PRIMARY"] }, { "id": 36, @@ -317,7 +327,7 @@ "rpm": 750, "mag_size": 50, "reload_time": 3.25, - "guntype": "RIFLE" + "guntype": ["RIFLE", "PRIMARY"] }, { "id": 37, @@ -327,7 +337,7 @@ "rpm": 30, "mag_size": 5, "reload_time": 3.5, - "guntype": "RIFLE?" + "guntype": ["RIFLE", "SEMI-AUTO", "PRIMARY"] }, { "id": 38, @@ -337,7 +347,7 @@ "rpm": 800, "mag_size": 50, "reload_time": 2.5, - "guntype": "SMG" + "guntype": ["SMG", "PRIMARY"] }, { "id": 39, @@ -347,7 +357,7 @@ "rpm": 900, "mag_size": 64, "reload_time": 4, - "guntype": "SMG" + "guntype": ["SMG", "PRIMARY"] }, { "id": 40, @@ -357,7 +367,7 @@ "rpm": 1000, "mag_size": 50, "reload_time": 2.45, - "guntype": "RIFLE" + "guntype": ["RIFLE", "PRIMARY"] }, { "id": 41, @@ -367,7 +377,7 @@ "rpm": 3000, "mag_size": 10000000000000000000, "reload_time": 0, - "guntype": "SPECIAL" + "guntype": ["SPECIAL"] }, { "id": 42, @@ -377,7 +387,7 @@ "rpm": 500, "mag_size": 650, "reload_time": 0, - "guntype": "SPECIAL" + "guntype": ["SPECIAL"] }, { "id": 43, @@ -387,7 +397,7 @@ "rpm": 300, "mag_size": 650, "reload_time": 0, - "guntype": "SPECIAL" + "guntype": ["SPECIAL"] }, { "id": 44, @@ -397,7 +407,17 @@ "rpm": 650, "mag_size": 18, "reload_time": 2, - "guntype": "PISTOL" + "guntype": ["PISTOL"] + }, + { + "id": 89, + "name": "Improved G18 (150+ Kills)", + "damage": 51, + "damage_multiplier": 1, + "rpm": 650, + "mag_size": 23, + "reload_time": 2, + "guntype": ["PISTOL"] }, { "id": 45, @@ -407,7 +427,7 @@ "rpm": 550, "mag_size": 18, "reload_time": 2, - "guntype": "PISTOL" + "guntype": ["PISTOL"] }, { "id": 46, @@ -417,7 +437,7 @@ "rpm": 225, "mag_size": 10, "reload_time": 5, - "guntype": "SHOTGUN" + "guntype": ["SHOTGUN", "PRIMARY"] }, { "id": 48, @@ -427,7 +447,7 @@ "rpm": 550, "mag_size": 30, "reload_time": 2.35, - "guntype": "RIFLE" + "guntype": ["RIFLE", "PRIMARY"] }, { "id": 49, @@ -437,7 +457,7 @@ "rpm": 600, "mag_size": 30, "reload_time": 2.35, - "guntype": "RIFLE" + "guntype": ["RIFLE", "PRIMARY"] }, { "id": 50, @@ -447,7 +467,7 @@ "rpm": 600, "mag_size": 32, "reload_time": 2.45, - "guntype": "RIFLE" + "guntype": ["RIFLE", "PRIMARY"] }, { "id": 51, @@ -457,7 +477,7 @@ "rpm": 650, "mag_size": 32, "reload_time": 2.45, - "guntype": "RIFLE" + "guntype": ["RIFLE", "PRIMARY"] }, { "id": 52, @@ -467,7 +487,7 @@ "rpm": 625, "mag_size": 100, "reload_time": 4.5, - "guntype": "LMG" + "guntype": ["LMG", "PRIMARY"] }, { "id": 53, @@ -477,17 +497,17 @@ "rpm": 700, "mag_size": 100, "reload_time": 4.5, - "guntype": "LMG" + "guntype": ["LMG", "PRIMARY"] }, { "id": 54, "name": "Improved P90", - "damage": 32, + "damage": 34, "damage_multiplier": 1, "rpm": 800, "mag_size": 50, "reload_time": 2.6, - "guntype": "SMG" + "guntype": ["SMG", "PRIMARY"] }, { "id": 55, @@ -497,7 +517,7 @@ "rpm": 550, "mag_size": 32, "reload_time": 2.5, - "guntype": "SMG" + "guntype": ["SMG", "PRIMARY", "WW2"] }, { "id": 56, @@ -507,7 +527,7 @@ "rpm": 700, "mag_size": 34, "reload_time": 3.5, - "guntype": "PISTOL" + "guntype": ["PISTOL"] }, { "id": 57, @@ -517,7 +537,7 @@ "rpm": 440, "mag_size": 18, "reload_time": 3.5, - "guntype": "RIFLE" + "guntype": ["RIFLE", "SEMI-AUTO", "PRIMARY"] }, { "id": 58, @@ -527,7 +547,7 @@ "rpm": 540, "mag_size": 18, "reload_time": 3.5, - "guntype": "RIFLE" + "guntype": ["RIFLE", "SEMI-AUTO", "PRIMARY"] }, { "id": 59, @@ -537,7 +557,7 @@ "rpm": 780, "mag_size": 30, "reload_time": 2.25, - "guntype": "RIFLE" + "guntype": ["RIFLE", "PRIMARY"] }, { "id": 60, @@ -547,7 +567,7 @@ "rpm": 900, "mag_size": 26, "reload_time": 2.5, - "guntype": "SMG?" + "guntype": ["PISTOL"] }, { "id": 61, @@ -557,7 +577,7 @@ "rpm": 1200, "mag_size": 26, "reload_time": 2, - "guntype": "SMG?" + "guntype": ["PISTOL"] }, { "id": 62, @@ -567,7 +587,7 @@ "rpm": 800, "mag_size": 30, "reload_time": 1.5, - "guntype": "SMG" + "guntype": ["SMG", "PRIMARY"] }, { "id": 63, @@ -587,7 +607,17 @@ "rpm": 1050, "mag_size": 30, "reload_time": 2, - "guntype": "SMG" + "guntype": ["SMG", "PRIMARY"] + }, + { + "id": 88, + "name": "Improved Vector (150+ Kills)", + "damage": 39, + "damage_multiplier": 1, + "rpm": 1050, + "mag_size": 33, + "reload_time": 2, + "guntype": ["SMG", "PRIMARY"] }, { "id": 65, @@ -597,7 +627,7 @@ "rpm": 850, "mag_size": 30, "reload_time": 2, - "guntype": "SMG" + "guntype": ["SMG", "PRIMARY"] }, { "id": 66, @@ -607,7 +637,7 @@ "rpm": 850, "mag_size": 30, "reload_time": 2, - "guntype": "SMG" + "guntype": ["SMG", "PRIMARY"] }, { "id": 67, @@ -637,7 +667,7 @@ "rpm": 830, "mag_size": 30, "reload_time": 2.5, - "guntype": "RIFLE" + "guntype": ["RIFLE", "PRIMARY"] }, { "id": 70, @@ -647,7 +677,7 @@ "rpm": 900, "mag_size": 30, "reload_time": 2.5, - "guntype": "RIFLE" + "guntype": ["RIFLE", "PRIMARY"] }, { "id": 71, @@ -667,7 +697,7 @@ "rpm": 700, "mag_size": 30, "reload_time": 3.25, - "guntype": "RIFLE" + "guntype": ["RIFLE", "PRIMARY"] }, { "id": 73, @@ -677,7 +707,7 @@ "rpm": 400, "mag_size": 18, "reload_time": 2.1, - "guntype": "PISTOL" + "guntype": ["PISTOL", "DEAGLE"] }, { "id": 74, @@ -687,7 +717,7 @@ "rpm": 400, "mag_size": 36, "reload_time": 3.5, - "guntype": "PISTOL" + "guntype": ["PISTOL", "DEAGLE"] }, { "id": 75, @@ -697,7 +727,7 @@ "rpm": 300, "mag_size": 10, "reload_time": 3, - "guntype": "RIFLE" + "guntype": ["RIFLE", "PRIMARY", "SEMI-AUTO"] }, { "id": 76, @@ -707,7 +737,7 @@ "rpm": 700, "mag_size": 10, "reload_time": 2, - "guntype": "RIFLE?" + "guntype": "RIFLE" }, { "id": 77, @@ -717,7 +747,7 @@ "rpm": 1000, "mag_size": 71, "reload_time": 2.5, - "guntype": "UNKOWN" + "guntype": ["SMG", "PRIMARY", "SOVIET"] }, { "id": 78, @@ -727,7 +757,7 @@ "rpm": 690, "mag_size": 30, "reload_time": 2.5, - "guntype": "RIFLE" + "guntype": ["RIFLE", "PRIMARY", "SOVIET"] }, { "id": 79, @@ -737,7 +767,7 @@ "rpm": 800, "mag_size": 64, "reload_time": 4, - "guntype": "SMG" + "guntype": ["SMG"] }, { "id": 80, @@ -747,7 +777,7 @@ "rpm": 800, "mag_size": 60, "reload_time": 4, - "guntype": "SMG" + "guntype": ["SMG"] }, { "id": 81, @@ -757,7 +787,7 @@ "rpm": 800, "mag_size": 50, "reload_time": 2.5, - "guntype": "SMG" + "guntype": ["SMG", "PRIMARY"] }, { "id": 82, @@ -767,7 +797,7 @@ "rpm": 400, "mag_size": 12, "reload_time": 2.6, - "guntype": "RIFLE" + "guntype": ["RIFLE"] }, { "id": 83, @@ -777,7 +807,7 @@ "rpm": 150, "mag_size": 8, "reload_time": 2.2, - "guntype": "SHOTGUN" + "guntype": ["SHOTGUN", "PRIMARY"] }, { "id": 84, @@ -787,7 +817,7 @@ "rpm": 200, "mag_size": 1000000000000000000000000000000000000000000000000000000000000000, "reload_time": 0, - "guntype": "SHOTGUN" + "guntype": ["SHOTGUN", "PRIMARY"] }, { "id": 85, @@ -797,7 +827,7 @@ "rpm": 900, "mag_size": 30, "reload_time": 4, - "guntype": "RIFLE" + "guntype": ["RIFLE", "PRIMARY"] }, { "id": 86, @@ -807,6 +837,6 @@ "rpm": 9999, "mag_size": 999, "reload_time": 1, - "guntype": "RIFLE" + "guntype": ["RIFLE", "PRIMARY"] } ] \ No newline at end of file diff --git a/static/modifiers.json b/static/json/modifiers.json similarity index 50% rename from static/modifiers.json rename to static/json/modifiers.json index 95c290c..dfcc6f8 100644 --- a/static/modifiers.json +++ b/static/json/modifiers.json @@ -4,25 +4,29 @@ "id": "damage-item-additive-elite-he-rounds", "label": "Elite HE Rounds (+14 damage)", "value": 14, - "type": "additive" + "type": "additive", + "operatives": "" }, { "id": "damage-item-additive-he-rounds", "label": "HE Rounds (+8 damage)", "value": 8, - "type": "additive" + "type": "additive", + "operatives": "" }, { "id": "damage-item-multiplicative-strength-mixture", "label": "Strength Mixture (+20% damage)", "value": 1.2, - "type": "multiplicative" + "type": "multiplicative", + "operatives": "" }, { "id": "damage-item-multiplicative-fortunos-necklace", "label": "Fortunos Necklace (+15% damage)", "value": 1.15, - "type": "multiplicative" + "type": "multiplicative", + "operatives": "" }, { "id": "multiple-buffs-bloxy-cola", @@ -38,19 +42,22 @@ "value": 0, "buffType": "multiplicative" } - ] + ], + "operatives": "" }, { "id": "damage-item-multiplicative-enhancer", "label": "Enhancer (+10% damage)", "value": 1.1, - "type": "multiplicative" + "type": "multiplicative", + "operatives": "" }, { "id": "damage-item-multiplicative-teleport-device", "label": "Teleport Device (+25% damage)", "value": 1.25, - "type": "multiplicative" + "type": "multiplicative", + "operatives": "" } ], "operativePerks": [ @@ -58,25 +65,35 @@ "id": "damage-perk-multiplicative-fbi-badge", "label": "FBI Badge (+10% Damage)", "value": 1.1, - "type": "multiplicative" + "type": "multiplicative", + "operatives": "UIU" }, { "id": "damage-perk-multiplicative-anatomy-book", "label": "Anatomy Book (+5% Damage)", "value": 1.05, - "type": "multiplicative" + "type": "multiplicative", + "operatives": "" }, { "id": "damage-perk-multiplicative-silly-soldier", "label": "Silly Soldier (+10% Damage)", "value": 1.10, - "type": "multiplicative" + "type": "multiplicative", + "operatives": "" }, { "id": "damage-perk-multiplicative-precise-shots", "label": "Precise Shots (+15% Damage)", - "value": 1.15, - "type": "multiplicative" + "buffs": [ + { + "type": "damage", + "value": 1.15, + "buffType": "multiplicative-headshot" + } + ], + "appliesTo": "", + "operatives": "" }, { "id": "damage-perk-multiplicative-goc-insignia", @@ -92,10 +109,23 @@ "value": 0.85, "buffType": "multiplicative" } - ] + ], + "operatives": "GOC" } ], "abilityPerks": [ + { + "id": "headshot-damage-buff", + "label": "[All Operatives] Headshot (+25% Damage)", + "buffs": [ + { + "type": "damage", + "value": 1.25, + "buffType": "multiplicative-headshot-base" + } + ], + "appliesTo": "" + }, { "id": "multiple-buffs-firefight", "label": "[All Operatives] Firefight (+35% Damage, +40% Reload Speed)", @@ -110,17 +140,22 @@ "value": 0.6, "buffType": "multiplicative" } - ] + ], + "operatives": "", + "appliesTo": "" }, { "id": "damage-ability-multiplicative-heath-spawn", "label": "[All Operatives] Heath Spawn (+30% Damage)", "value": 1.3, - "type": "multiplicative" + "type": "multiplicative", + "operatives": "", + "appliesTo": "" }, { "id": "multiple-buffs-warcry", "label": "[All Operatives] War Cry(+25% Damage, +?% Reload Speed)", + "operatives": "", "buffs": [ { "type": "damage", @@ -132,37 +167,125 @@ "value": 1, "buffType": "multiplicative" } - ] + ], + "appliesTo": "" + }, + { + "id": "reload-buff-focus-fire", + "label": "[All Operatives] Focus Fire (+20% Reload Speed)", + "buffs": [ + { + "type": "reloadTime", + "value": 0.8, + "buffType": "multiplicative" + } + ], + "operatives": "", + "appliesTo": "" }, { "id": "damage-ability-multiplicative-blackout", "label": "[All Operatives] Blackout (+30% Damage)", "value": 1.3, - "type": "multiplicative" + "type": "multiplicative", + "operatives": "", + "appliesTo": "" + }, + { + "id": "damage-ability-demoman", + "label": "[All Operatives] Enemy hit by Demolitionist Explosive (+15% Damage)", + "value": 1.15, + "type": "multiplicative", + "operatives": "", + "appliesTo": "" }, { "id": "damage-ability-multiplicative-red-scan", "label": "[All Operatives] Red Scan (+30% Damage)", "value": 1.3, - "type": "multiplicative" + "type": "multiplicative", + "operatives": "", + "appliesTo": "" }, { "id": "damage-ability-multiplicative-red-scan", "label": "[All Operatives] Green Scan (+50% Damage)", "value": 1.5, - "type": "multiplicative" + "type": "multiplicative", + "operatives": "", + "appliesTo": "" }, { "id": "damage-ability-multiplicative-point-out", "label": "[All Operatives] Point Out (+50% Damage)", "value": 1.5, - "type": "multiplicative" + "type": "multiplicative", + "operatives": "", + "appliesTo": "" }, { "id": "damage-item-additive-5-uiu-elite", "label": "[All Operatives] 5 UIU Elite nearby (+25 damage)", "value": 25, - "type": "additive" + "type": "additive", + "operatives": "", + "appliesTo": "" + }, + { + "id": "damage-item-additive-field-support", + "label": "[All Operatives] MTF Commander Field Support (+8 damage)", + "value": 8, + "type": "additive", + "operatives": "", + "appliesTo": "" + }, + { + "id": "damage-ability-multiplicative-scan grenade", + "label": "[All Operatives] Scan Grenade (+15% Damage)", + "value": 1.15, + "type": "multiplicative", + "operatives": "", + "appliesTo": "" + }, + { + "id": "damage-upgrade-multiplicative-upgraded-bullets", + "label": "[All Operatives] Experimental Bullets (+30% Damage)", + "value": 1.3, + "type": "multiplicative", + "operatives": "", + "appliesTo": "" + }, + { + "id": "damage-item-additive-GOC", + "label": "[All Operatives] GOC Ally (+8 damage)", + "value": 8, + "type": "additive", + "operatives": "", + "appliesTo": "" + }, + { + "id": "damage-item-additive-GOC-1", + "label": "[All Operatives] Weak Points (+8 damage)", + "value": 8, + "type": "additive", + "operatives": "", + "appliesTo": "" + }, + { + "id": "damage-item-additive-GOC-3", + "label": "[All Operatives] GOC Ally: Kraken Buff (+3 damage)", + "value": 3, + "type": "additive", + "operatives": "", + "appliesTo": "" + }, + { + "id": "damage-item-additive-uiu-1", + "label": "[All Operatives] UIU Upgraded Towers (+10% damage)", + "value": 1.1, + "type": "multiplicative", + "operatives": "", + "appliesTo": "" } ] -} +} \ No newline at end of file diff --git a/static/json/operative.json b/static/json/operative.json new file mode 100644 index 0000000..df13744 --- /dev/null +++ b/static/json/operative.json @@ -0,0 +1,1822 @@ +{ + "operatives": [ + { + "id": "Classic-Guard", + "name": "Guard", + "category": "Classic", + "modifiers": [ + { + "id": "smg-user-damage-perk", + "label": "SMG User (+15% Damage)", + "value": 1.15, + "type": "multiplicative", + "appliesTo": "SMG" + } + ] + }, + { + "id": "Classic-Scout", + "name": "Scout", + "category": "Classic", + "modifiers": [ + { + "id": "run-and-gun-damage-perk", + "label": "Run and Gun 100% (+12% Firerate, +16% Reload Speed)", + "buffs": [ + { + "type": "rpm", + "value": 1.12, + "buffType": "multiplicative" + }, + { + "type": "reloadTime", + "value": 0.84, + "buffType": "multiplicative" + } + ] + } + ] + }, + { + "id": "Classic-RCU", + "name": "RCU", + "category": "Classic", + "modifiers": [ + { + "id": "shotgun-expert-damage-perk", + "label": "Shotgun Expert (+25% Damage)", + "value": 1.25, + "type": "multiplicative", + "appliesTo": "SHOTGUN" + } + ] + }, + { + "id": "Classic-Viper", + "name": "Viper", + "category": "Classic" + }, + { + "id": "Classic-SD-Sergeant", + "name": "SD Sergeant", + "category": "Classic", + "modifiers": [ + { + "id": "max-corruption-damage-perk", + "label": "Max Corruption (+30% Damage)", + "value": 1.30, + "type": "multiplicative", + "appliesTo": "" + }, + { + "id": "sergeant-high-velocity-bullets-damage-perk", + "label": "High Velocity Bullets (+25% Damage)", + "buffs": [ + { + "type": "damage", + "value": 1.25, + "buffType": "multiplicative" + } + ], + "appliesTo": "" + }, + { + "id": "sergeant-quick-hands-reload-perk", + "label": "Quick Hands (+20% Reload Speed)", + "buffs": [ + { + "type": "reloadTime", + "value": 0.8, + "buffType": "multiplicative" + } + ], + "appliesTo": "" + } + ] + }, + { + "id": "Classic-ISD", + "name": "ISD", + "category": "Classic", + "modifiers": [ + { + "id": "chaos-insurgency-damage-perk", + "label": "Chaos Insurgency (+50% Damage)", + "value": 1.50, + "type": "multiplicative", + "appliesTo": "" + } + ] + }, + { + "id": "Classic-TRU", + "name": "TRU", + "category": "Classic" + }, + { + "id": "Classic-SD-Captain", + "name": "SD Captain", + "category": "Classic" + }, + { + "id": "Classic-Vanguard", + "name": "Vanguard", + "category": "Classic", + "modifiers": [ + { + "id": "bad-experience-damage-perk", + "label": "Bad Experience (+25% Damage, +25% Reload Speed)", + "buffs": [ + { + "type": "damage", + "value": 1.25, + "buffType": "multiplicative" + }, + { + "type": "reloadTime", + "value": 0.75, + "buffType": "multiplicative" + } + ], + "appliesNotTo": "LMG" + }, + { + "id": "lmg-user-damage-perk", + "label": "LMG User (+35% Damage)", + "value": 1.35, + "type": "multiplicative", + "appliesTo": "LMG" + } + ] + }, + { + "id": "Classic-Demolitionist", + "name": "Demolitionist", + "category": "Classic" + }, + { + "id": "Classic-Juggernaut", + "name": "Juggernaut", + "category": "Classic", + "modifiers": [ + { + "id": "hold-the-line-damage-perk", + "label": "Hold The Line (+90% Damage)", + "value": 1.90, + "type": "multiplicative", + "appliesTo": "" + } + ] + }, + { + "id": "Classic-Mercenary", + "name": "Mercenary", + "category": "Classic", + "modifiers": [ + { + "id": "all-upgrades-damage-perk", + "label": "All Upgrades (+25% Damage, +15% Reload Speed)", + "buffs": [ + { + "type": "damage", + "value": 1.25, + "buffType": "multiplicative" + }, + { + "type": "reloadTime", + "value": 0.85, + "buffType": "multiplicative" + } + ], + "appliesTo": "" + }, + { + "id": "mcd-sandevistan-damage-perk", + "label": "MCD Sandevistan (+75% Damage)", + "value": 1.75, + "type": "multiplicative", + "appliesTo": "" + } + ] + }, + { + "id": "Classic-CRT", + "name": "CRT", + "category": "Classic" + }, + { + "id": "Classic-Anarchist", + "name": "Anarchist", + "category": "Classic", + "modifiers": [ + { + "id": "armor-restructure-10-damage-perk", + "label": "Armor Restructure (10 HP Left) (+32% Damage)", + "value": 1.32, + "type": "multiplicative", + "appliesTo": "" + }, + { + "id": "anarchist-threat-control-damage-perk", + "label": "Threat Control (Max Corruption) (+20 Damage)", + "value": 20, + "type": "additive", + "appliesTo": "" + }, + { + "id": "berserker-damage-perk", + "label": "Berserker (+30 Damage)", + "value": 30, + "type": "additive", + "appliesTo": "" + }, + { + "id": "anarchist-adrenaline-damage-perk", + "label": "Adrenaline (+30% Damage)", + "value": 1.3, + "type": "multiplicative", + "appliesTo": "" + } + ] + }, + { + "id": "Special-Squid-Guard", + "name": "Squid Guard", + "category": "Special", + "modifiers": [ + { + "id": "smg-user-damage-perk", + "label": "SMG User (+15% Damage)", + "value": 1.15, + "type": "multiplicative", + "appliesTo": "SMG" + } + ] + }, + { + "id": "Special-Researcher", + "name": "Researcher", + "category": "Special", + "modifiers": [] + }, + { + "id": "Special-RRT", + "name": "RRT", + "category": "Special", + "modifiers": [ + { + "id": "smg-user-damage-perk", + "label": "SMG User (+15% Damage)", + "value": 1.15, + "type": "multiplicative", + "appliesTo": "SMG" + }, + { + "id": "weapon-expert-reload-perk", + "label": "Weapon Expert (-1s Reload Time)", + "value": -1, + "type": "additive", + "appliesTo": "" + }, + { + "id": "rrt-mastery-damage-rpm-perk", + "label": "Mastery (+25% Firerate, +25% Damage)", + "buffs": [ + { + "type": "damage", + "value": 1.25, + "buffType": "multiplicative" + }, + { + "type": "rpm", + "value": 1.25, + "buffType": "multiplicative" + } + ], + "appliesTo": "" + } + ] + }, + { + "id": "Special-Private", + "name": "Private", + "category": "Special", + "modifiers": [ + { + "id": "nostalgia-reload-perk", + "label": "Nostalgia (+10% Reload Speed)", + "value": 0.9, + "type": "multiplicative", + "appliesTo": "" + }, + { + "id": "adrenaline-damage-reload-perk", + "label": "Adrenaline (+30% Damage, +40% Reload Speed)", + "buffs": [ + { + "type": "damage", + "value": 1.3, + "buffType": "multiplicative" + }, + { + "type": "reloadTime", + "value": 0.6, + "buffType": "multiplicative" + } + ], + "appliesTo": "" + }, + { + "id": "private-mastery-damage-perk", + "label": "Mastery (+32% Damage)", + "value": 1.32, + "type": "multiplicative", + "appliesTo": "WW2" + } + ] + }, + { + "id": "Special-Delta", + "name": "Delta", + "category": "Special", + "modifiers": [ + { + "id": "weakpoints-damage-perk", + "label": "Weakpoints (+50% Damage)", + "value": 1.5, + "type": "multiplicative", + "appliesTo": "" + }, + { + "id": "mastery-resurrection-damage-perk", + "label": "Resurrection (+100% Damage)", + "value": 2, + "type": "multiplicative", + "appliesTo": "" + } + ] + }, + { + "id": "Special-Engineer", + "name": "Engineer", + "category": "Special", + "modifiers": [] + }, + { + "id": "Special-Hunter", + "name": "Hunter", + "category": "Special", + "modifiers": [ + { + "id": "camper-damage-perk", + "label": "Camper [SEMI-AUTO] (+25% Damage)", + "value": 1.25, + "type": "multiplicative", + "appliesTo": "SEMI-AUTO" + }, + { + "id": "detect-damage-perk", + "label": "Detect (+25% Damage)", + "value": 1.25, + "type": "multiplicative", + "appliesTo": "" + }, + { + "id": "reaper-ammunition-damage-perk", + "label": "Reaper ammunition (+30% Damage)", + "value": 1.3, + "type": "multiplicative", + "appliesTo": "" + } + ] + }, + { + "id": "Special-Agent-X", + "name": "Agent X", + "category": "Special", + "modifiers": [ + { + "id": "agent-training-rifle-damage-perk", + "label": "Agent training [RIFLE] (+15% Damage)", + "value": 1.15, + "type": "multiplicative", + "appliesTo": "RIFLE" + }, + { + "id": "agent-training-smg-damage-perk", + "label": "Agent training [SMG] (+25% Damage, 30% Reload Speed)", + "buffs": [ + { + "type": "damage", + "value": 1.25, + "buffType": "multiplicative" + }, + { + "type": "reloadTime", + "value": 0.7, + "buffType": "multiplicative" + } + ], + "appliesTo": "SMG" + }, + { + "id": "sandevistan-damage-perk", + "label": "Sandevistan (+75% Damage)", + "value": 1.75, + "type": "multiplicative", + "appliesTo": "" + } + ] + }, + { + "id": "Special-Hacker", + "name": "Hacker", + "category": "Special" + }, + { + "id": "Special-Accountant", + "name": "Accountant", + "category": "Special" + }, + { + "id": "Special-Hogrider", + "name": "Hog Rider", + "category": "Special" + }, + { + "id": "Special-IA", + "name": "Intelligence Agency", + "category": "Special", + "modifiers": [ + { + "id": "field-intelligence-damage-perk", + "label": "Field Intelligence (+20% Damage)", + "value": 1.2, + "type": "multiplicative", + "appliesTo": "" + }, + { + "id": "front-runner-damage-perk", + "label": "Front Runner (+?% Damage)", + "value": 1, + "type": "multiplicative", + "appliesTo": "" + }, + { + "id": "SMG-Pro-reload-perk", + "label": "SMG Pro (+100% Reload Speed)", + "buffs": [ + { + "type": "reloadTime", + "value": 0, + "buffType": "multiplicative" + } + ], + "appliesTo": "SMG" + }, + { + "id": "IA-smg-damage-perk", + "label": "SMG User (+15% Damage)", + "value": 1.15, + "type": "multiplicative", + "appliesTo": "SMG" + } + ] + }, + { + "id": "Special-High-Roller", + "name": "High Roller", + "category": "Special", + "modifiers": [ + { + "id": "lucky-shot-damage-perk", + "label": "Lucky Shot (+100% Damage)", + "value": 2, + "type": "multiplicative", + "appliesTo": "" + }, + { + "id": "risk-taker-damage-perk", + "label": "4 Experiments (+10% Damage, +10% Firerate)", + "buffs": [ + { + "type": "damage", + "value": 1.1, + "buffType": "multiplicative" + }, + { + "type": "rpm", + "value": 1.1, + "buffType": "multiplicative" + } + ], + "appliesTo": "" + }, + { + "id": "coinflip-damage-perk", + "label": "Coinflip (+20% Damage)", + "value": 1.20, + "type": "multiplicative", + "appliesTo": "" + }, + { + "id": "coinflip-reload-perk", + "label": "Coinflip (+20% Reload Speed)", + "buffs": [ + { + "type": "reloadTime", + "value": 0.8, + "buffType": "multiplicative" + } + ], + "appliesTo": "" + }, + { + "id": "coinflip-damage-perk-2", + "label": "Coinflip (+100% Damage)", + "value": 2, + "type": "multiplicative", + "appliesTo": "" + }, + { + "id": "maxed-stat-roll-damage-perk", + "label": "Maxed Stat Roll (+20% Damage, +20% Reload Speed)", + "buffs": [ + { + "type": "damage", + "value": 1.2, + "buffType": "multiplicative" + }, + { + "type": "reloadTime", + "value": 1.2, + "buffType": "multiplicative" + } + ], + "appliesTo": "" + }, + { + "id": "points-damage-perk", + "label": "6000 Points (+20% Damage)", + "buffs": [ + { + "type": "damage", + "value": 1.20, + "buffType": "multiplicative" + } + ], + "appliesTo": "" + }, + { + "id": "light-armor-damage-perk", + "label": "Light Armor [RIFLE] (+25% Damage)", + "buffs": [ + { + "type": "damage", + "value": 1.25, + "buffType": "multiplicative" + } + ], + "appliesTo": "RIFLE" + }, + { + "id": "heavy-armor-damage-perk", + "label": "Heavy Armor [LMG] (+25% Damage)", + "buffs": [ + { + "type": "damage", + "value": 1.25, + "buffType": "multiplicative" + } + ], + "appliesTo": "LMG" + }, + { + "id": "fireproof-armor-damage-perk", + "label": "Fireproof Armor [SHOTGUN] (+25% Damage)", + "buffs": [ + { + "type": "damage", + "value": 1.25, + "buffType": "multiplicative" + } + ], + "appliesTo": "SHOTGUN" + }, + { + "id": "hazmat-armor-damage-perk", + "label": "Hazmat Armor [SMG] (+25% Damage)", + "buffs": [ + { + "type": "damage", + "value": 1.25, + "buffType": "multiplicative" + } + ], + "appliesTo": "SMG" + }, + { + "id": "no-armor-damage-perk", + "label": "Armorless [SEMI-AUTO] (+25% Damage)", + "buffs": [ + { + "type": "damage", + "value": 1.25, + "buffType": "multiplicative" + } + ], + "appliesTo": "SEMI-AUTO" + } + ] + }, + { + "id": "Special-Veteran", + "name": "Veteran", + "category": "Special", + "modifiers": [ + { + "id": "advanced-ammo-damage-perk", + "label": "Advanced Ammo (+8 Damage)", + "value": 8, + "type": "additive", + "appliesTo": "" + }, + { + "id": "high-velocity-bullets-damage-perk", + "label": "High Velocity Bullets (+25% Damage)", + "value": 1.25, + "type": "multiplicative", + "appliesTo": "" + } + ] + }, + { + "id": "MTF-Epsilon-9", + "name": "Epsilon-9", + "category": "MTF" + }, + { + "id": "MTF-Nu-7", + "name": "Nu-7", + "category": "MTF", + "modifiers": [ + { + "id": "deadly-bullets-damage-perk", + "label": "Deadly Bullets (+30% Damage)", + "value": 1.3, + "type": "multiplicative", + "appliesTo": "" + }, + { + "id": "weapon-expert-reload-perk", + "label": "Weapon Expert (-1s Reload Time)", + "value": -1, + "type": "additive", + "appliesTo": "" + } + ] + }, + { + "id": "MTF-Sigma-9", + "name": "Sigma-9", + "category": "MTF" + }, + { + "id": "MTF-Beta-7", + "name": "Beta-7", + "category": "MTF", + "modifiers": [ + { + "id": "toxic-rounds-damage-perk", + "label": "Toxic Rounds (+8 Damage)", + "value": 8, + "type": "additive", + "appliesTo": "" + }, + { + "id": "toxic-rounds-exploders-damage-perk", + "label": "Toxic Rounds (Against Exploders) (+100% Damage)", + "value": 2, + "type": "multiplicative", + "appliesTo": "" + } + ] + }, + { + "id": "MTF-Commander", + "name": "MTF Commander", + "category": "MTF", + "modifiers": [ + { + "id": "advanced-ammo-damage-perk", + "label": "Advanced Ammo (+8 Damage)", + "value": 8, + "type": "additive", + "appliesTo": "" + } + ] + }, + { + "id": "UIU-Assault", + "name": "UIU Assault", + "category": "UIU", + "modifiers": [ + { + "id": "uiu-assault-ar-user-damage-perk", + "label": "AR User [RIFLE] (+30% Damage)", + "buffs": [ + { + "type": "damage", + "value": 1.3, + "buffType": "multiplicative" + } + ], + "appliesTo": "RIFLE" + } + ] + }, + { + "id": "UIU-HRU", + "name": "UIU HRU", + "category": "UIU", + "modifiers": [ + { + "id": "uiu-hru-full-metal-jacket-damage-perk", + "label": "Full Metal Jacket (+10% Damage)", + "buffs": [ + { + "type": "damage", + "value": 1.1, + "buffType": "multiplicative" + } + ], + "appliesTo": "" + }, + { + "id": "uiu-hru-skull-cracker-damage-perk", + "label": "Skull Cracker (+15% Damage)", + "buffs": [ + { + "type": "damage", + "value": 1.15, + "buffType": "multiplicative-headshot" + } + ], + "appliesTo": "" + }, + { + "id": "uiu-hru-deagle-8-damage-perk", + "label": "Anomalous Deagle (Raid) (+8 Damage)", + "buffs": [ + { + "type": "damage", + "value": 8, + "buffType": "additive" + } + ], + "appliesTo": "DEAGLE" + }, + { + "id": "uiu-hru-deagle-15-damage-perk", + "label": "Anomalous Deagle (Classic) (+15 Damage)", + "buffs": [ + { + "type": "damage", + "value": 15, + "buffType": "additive" + } + ], + "appliesTo": "DEAGLE" + } + ] + }, + { + "id": "UIU-Marksman", + "name": "UIU Marksman", + "category": "UIU", + "modifiers": [ + { + "id": "camper-damage-perk-damage-perk", + "label": "Camper [SEMI-AUTO] (+25% Damage)", + "buffs": [ + { + "type": "damage", + "value": 1.25, + "buffType": "multiplicative" + } + ], + "appliesTo": "SEMI-AUTO" + }, + { + "id": "uiu-marksman-skull-cracker-damage-perk", + "label": "Skull Cracker (+15% Damage)", + "buffs": [ + { + "type": "damage", + "value": 1.15, + "buffType": "multiplicative-headshot" + } + ], + "appliesTo": "" + } + ] + }, + { + "id": "UIU-Elite", + "name": "UIU Elite", + "category": "UIU", + "modifiers": [ + { + "id": "uiu-elite-ar-user-damage-perk", + "label": "AR User [RIFLE] (+30% Damage)", + "buffs": [ + { + "type": "damage", + "value": 1.3, + "buffType": "multiplicative" + } + ], + "appliesTo": "RIFLE" + }, + { + "id": "uiu-elite-moral-boost-damage-perk", + "label": "Moral Boost (+20% Damage)", + "buffs": [ + { + "type": "damage", + "value": 1.2, + "buffType": "multiplicative" + } + ], + "appliesTo": "" + }, + { + "id": "uiu-elite-master-teamwork-damage-perk", + "label": "Master Teamwork (+30% Damage)", + "buffs": [ + { + "type": "damage", + "value": 1.3, + "buffType": "multiplicative" + } + ], + "appliesTo": "" + }, + { + "id": "uiu-elite-reload-perk", + "label": "Mastery (+30% Reload Speed)", + "buffs": [ + { + "type": "reloadTime", + "value": 0.7, + "buffType": "multiplicative" + } + ], + "appliesTo": "RIFLE" + } + ] + }, + { + "id": "UIU-Detective", + "name": "UIU Detective", + "category": "UIU", + "modifiers": [ + { + "id": "uiu-detective-sense-damage-perk", + "label": "Sense (+100% Damage)", + "buffs": [ + { + "type": "damage", + "value": 2, + "buffType": "multiplicative" + } + ], + "appliesTo": "" + }, + { + "id": "uiu-detective-secondaries-boost-damage-perk", + "label": "Mastery [SECONDARY] (+50% Damage)", + "buffs": [ + { + "type": "damage", + "value": 1.5, + "buffType": "multiplicative" + } + ], + "appliesTo": "SECONDARY" + }, + { + "id": "search-expert-reload-perk", + "label": "Search Expert (+50% Reload Speed)", + "buffs": [ + { + "type": "reloadTime", + "value": 0.5, + "buffType": "multiplicative" + } + ], + "appliesTo": "" + } + ] + }, + { + "id": "UIU-Bulldozer", + "name": "UIU Bulldozer", + "category": "UIU", + "modifiers": [ + { + "id": "shotgun-specialist-damage-perk", + "label": "Shotgun Specialist [SHOTGUN] (+30% Damage)", + "buffs": [ + { + "type": "damage", + "value": 1.3, + "buffType": "multiplicative" + } + ], + "appliesTo": "SHOTGUN" + }, + { + "id": "cqc-experience-damage-perk", + "label": "CQC Experience (+20% Damage)", + "buffs": [ + { + "type": "damage", + "value": 1.2, + "buffType": "multiplicative" + } + ], + "appliesTo": "" + }, + { + "id": "double-reload-reload-perk", + "label": "Double Reload [SHOTGUN] (+50% Reload Speed)", + "buffs": [ + { + "type": "reloadTime", + "value": 0.5, + "buffType": "multiplicative" + } + ], + "appliesTo": "SHOTGUN" + }, + { + "id": "anger-issues-damage-perk", + "label": "Aggression bar (+20% Firerate, +20% Reload Speed)", + "buffs": [ + { + "type": "rpm", + "value": 1.2, + "buffType": "multiplicative" + }, + { + "type": "reloadTime", + "value": 0.8, + "buffType": "multiplicative" + } + ], + "appliesTo": "" + }, + { + "id": "deadly-rush-damage-perk", + "label": "Deadly Rush Ability (+20% Damage, 25% RPM)", + "buffs": [ + { + "type": "rpm", + "value": 1.25, + "buffType": "multiplicative" + }, + { + "type": "damage", + "value": 1.2, + "buffType": "multiplicative" + } + ], + "appliesTo": "" + }, + { + "id": "bulldozer-time-damage-perk", + "label": "Bulldozer Time Ability (2x Firerate, 2x Reload Speed)", + "buffs": [ + { + "type": "rpm", + "value": 2, + "buffType": "multiplicative" + }, + { + "type": "reloadTime", + "value": 0.5, + "buffType": "multiplicative" + } + ], + "appliesTo": "" + }, + { + "id": "mastery-damage-perk", + "label": "Mastery (+20% Reload Speed)", + "buffs": [ + { + "type": "reloadTime", + "value": 0.8, + "buffType": "multiplicative" + } + ], + "appliesTo": "" + } + ] + }, + { + "id": "UIU-Cloaker", + "name": "UIU Cloaker", + "category": "UIU", + "modifiers": [ + { + "id": "uiu-cloaker-ambusher-perk-damage-perk", + "label": "Ambusher (+50% Damage)", + "buffs": [ + { + "type": "damage", + "value": 1.5, + "buffType": "multiplicative" + } + ], + "appliesTo": "" + }, + { + "id": "quick-movements-reload-perk", + "label": "Quick Movements (+50% Reload Speed)", + "buffs": [ + { + "type": "reloadTime", + "value": 0.5, + "buffType": "multiplicative" + } + ], + "appliesTo": "" + } + ] + }, + { + "id": "UIU-Captain", + "name": "UIU Captain", + "category": "UIU", + "modifiers": [ + { + "id": "agent-training-rifle-damage-perk", + "label": "Agent training [RIFLE] (+15% Damage)", + "value": 1.15, + "type": "multiplicative", + "appliesTo": "RIFLE" + }, + { + "id": "agent-training-smg-damage-perk", + "label": "Agent training [SMG] (+25% Damage, 30% Reload Speed)", + "buffs": [ + { + "type": "damage", + "value": 1.25, + "buffType": "multiplicative" + }, + { + "type": "reloadTime", + "value": 0.7, + "buffType": "multiplicative" + } + ], + "appliesTo": "SMG" + } + ] + }, + { + "id": "UIU-MOOT", + "name": "UIU MOOT", + "category": "UIU", + "modifiers": [ + { + "id": "uiu-moot-ar-user-damage-perk", + "label": "AR User [RIFLE] (+30% Damage)", + "value": 1.3, + "type": "multiplicative", + "appliesTo": "RIFLE" + }, + { + "id": "uiu-moot-anchoring-ammunition-damage-perk", + "label": "Anchoring Ammunition (+40% Damage)", + "value": 1.4, + "type": "multiplicative", + "appliesTo": "" + } + ] + }, + { + "id": "UIU-Technician", + "name": "UIU Technician", + "category": "UIU", + "modifiers": [ + { + "id": "agent-training-rifle-damage-perk", + "label": "Agent training [RIFLE] (+15% Damage)", + "value": 1.15, + "type": "multiplicative", + "appliesTo": "RIFLE" + }, + { + "id": "agent-training-smg-damage-perk", + "label": "Agent training [SMG] (+25% Damage, 30% Reload Speed)", + "buffs": [ + { + "type": "damage", + "value": 1.25, + "buffType": "multiplicative" + }, + { + "type": "reloadTime", + "value": 0.7, + "buffType": "multiplicative" + } + ], + "appliesTo": "SMG" + }, + { + "id": "uiu-quick-hands-reload-perk", + "label": "Quick Hands (+20% Reload Speed)", + "buffs": [ + { + "type": "reloadTime", + "value": 0.8, + "buffType": "multiplicative" + } + ], + "appliesTo": "" + } + ] + }, + { + "id": "UIU-Oathbreaker", + "name": "UIU Oathbreaker", + "category": "UIU", + "modifiers": [ + { + "id": "agent-training-rifle-damage-perk", + "label": "Agent training [RIFLE] (+15% Damage)", + "value": 1.15, + "type": "multiplicative", + "appliesTo": "RIFLE" + }, + { + "id": "agent-training-smg-damage-perk", + "label": "Agent training [SMG] (+25% Damage, 30% Reload Speed)", + "buffs": [ + { + "type": "damage", + "value": 1.25, + "buffType": "multiplicative" + }, + { + "type": "reloadTime", + "value": 0.7, + "buffType": "multiplicative" + } + ], + "appliesTo": "SMG" + } + ] + }, + { + "id": "GRU-P-Assault", + "name": "GRU-P Assault", + "category": "GRU-P", + "modifiers": [ + { + "id": "not-step-back-damage-perk", + "label": "Not one step back (+50% Damage)", + "value": 1.5, + "type": "multiplicative", + "appliesTo": "" + }, + { + "id": "gru-p-assault-mastery-reload-perk", + "label": "Mastery [SOVIET WEAPONS] (+10% Reload Speed)", + "buffs": [ + { + "type": "reloadTime", + "value": 0.9, + "buffType": "multiplicative" + } + ], + "appliesTo": "SOVIET" + }, + { + "id": "gru-p-assault-mastery-damage-perk", + "label": "Mastery (+20% Damage)", + "buffs": [ + { + "type": "damage", + "value": 1.2, + "buffType": "multiplicative" + } + ], + "appliesTo": "" + }, + { + "id": "gru-p-assault-patriotic-damage-perk", + "label": "Patriotic (+60% Damage)", + "buffs": [ + { + "type": "damage", + "value": 1.6, + "buffType": "multiplicative" + } + ], + "appliesTo": "" + } + ] + }, + { + "id": "GRU-P-Specialist", + "name": "GRU-P Specialist", + "category": "GRU-P", + "modifiers": [ + { + "id": "well-taught-reload-perk", + "label": "Well Taught (+50% Reload Speed)", + "buffs": [ + { + "type": "reloadTime", + "value": 0.5, + "buffType": "multiplicative" + } + ], + "appliesNotTo": "SHOTGUN" + }, + { + "id": "heavy-bullets-damage-perk", + "label": "Heavy Bullets (+32% Damage)", + "buffs": [ + { + "type": "damage", + "value": 1.32, + "buffType": "multiplicative" + } + ], + "appliesTo": "" + } + ] + }, + { + "id": "winter-soldier", + "name": "Winter Soldier", + "category": "GRU-P", + "modifiers": [ + { + "id": "snow-beast-reload-perk", + "label": "Snow Beast (+25% Reload Speed)", + "buffs": [ + { + "type": "reloadTime", + "value": 0.75, + "buffType": "multiplicative" + } + ], + "appliesNotTo": "" + }, + { + "id": "heavy-bullets-damage-perk", + "label": "Heavy Bullets (+32% Damage)", + "buffs": [ + { + "type": "damage", + "value": 1.32, + "buffType": "multiplicative" + } + ], + "appliesTo": "" + }, + { + "id": "ws-mastery-damage-perk", + "label": "Mastery (+?% Damage, +?% Reload Speed)", + "buffs": [ + { + "type": "damage", + "value": 1, + "buffType": "multiplicative" + }, + { + "type": "reloadTime", + "value": 1, + "buffType": "multiplicative" + } + ], + "appliesTo": "" + } + ] + }, + { + "id": "shade", + "name": "Shade", + "category": "SCP", + "modifiers": [ + { + "id": "hell-bullets-damage-perk", + "label": "Hell Bullets (+10% Damage)", + "buffs": [ + { + "type": "damage", + "value": 1.1, + "buffType": "multiplicative" + } + ], + "appliesTo": "" + } + ] + }, + { + "id": "magmion", + "name": "Magmion", + "category": "SCP" + }, + { + "id": "frostkill", + "name": "Frostkill", + "category": "SCP" + }, + { + "id": "able", + "name": "Able", + "category": "SCP" + }, + { + "id": "devil-hunter", + "name": "Devil Hunter", + "category": "SCP" + }, + { + "id": "polatia-heath", + "name": "Heath", + "category": "Polatia", + "modifiers": [ + { + "id": "angel-of-death-damage-perk", + "label": "Angel of Death (+20% Damage, +20% Reload Speed, +20% Firerate)", + "buffs": [ + { + "type": "damage", + "value": 1.2, + "buffType": "multiplicative" + }, + { + "type": "rpm", + "value": 1.2, + "buffType": "multiplicative" + }, + { + "type": "reloadTime", + "value": 0.8, + "buffType": "multiplicative" + } + ], + "appliesTo": "" + } + ] + }, + { + "id": "polatia-thavin", + "name": "Thavin", + "category": "Polatia" + }, + { + "id": "polatia-dd", + "name": "Diamond Dog", + "category": "Polatia", + "modifiers": [ + { + "id": "experimental-kamui-damage-perk", + "label": "Experimental Kami (+40% Damage, +35% Reload Speed)", + "buffs": [ + { + "type": "damage", + "value": 1.4, + "buffType": "multiplicative" + }, + { + "type": "reloadTime", + "value": 0.65, + "buffType": "multiplicative" + } + ], + "appliesTo": "" + } + ] + }, + { + "id": "polatia-arms-dealer", + "name": "Polatia Arms Dealer", + "category": "Polatia", + "modifiers": [ + { + "id": "polatia-high-velocity-bullets-damage-perk", + "label": "High Velocity Bullets (+25% Damage)", + "buffs": [ + { + "type": "damage", + "value": 1.25, + "buffType": "multiplicative" + } + ], + "appliesTo": "" + }, + { + "id": "familiarity-reload-perk", + "label": "Familiarity (+30% Reload Speed)", + "buffs": [ + { + "type": "reloadTime", + "value": 0.7, + "buffType": "multiplicative" + } + ], + "appliesTo": "" + } + ] + }, + { + "id": "polatia-contractor", + "name": "Polatia Contractor", + "category": "Polatia" + }, + { + "id": "polatia-consigliere", + "name": "Polatia Consigliere", + "category": "Polatia" + }, + { + "id": "pratva-hitman", + "name": "Pratva Hitman", + "category": "Polatia", + "modifiers": [ + { + "id": "hit-list-damage-perk", + "label": "Hit List (+30% Damage)", + "buffs": [ + { + "type": "damage", + "value": 1.3, + "buffType": "multiplicative" + } + ], + "appliesTo": "" + }, + { + "id": "Backliner-damage-perk", + "label": "Backliner (+20% Damage)", + "buffs": [ + { + "type": "damage", + "value": 1.20, + "buffType": "multiplicative" + } + ], + "appliesTo": "" + }, + { + "id": "spree-damage-perk", + "label": "Headshot Spree (+50% Damage)", + "buffs": [ + { + "type": "damage", + "value": 1.5, + "buffType": "multiplicative" + } + ], + "appliesTo": "" + } + ] + }, + { + "id": "pratva-machinegunner", + "name": "Pratva Machinegunner", + "category": "Polatia", + "modifiers": [ + { + "id": "spray-and-pary-damage-perk", + "label": "Spray and Pray (+50% Damage)", + "buffs": [ + { + "type": "damage", + "value": 1.5, + "buffType": "multiplicative" + } + ], + "appliesTo": "" + }, + { + "id": "static-defender-reload-perk", + "label": "Static Defender (+30% Reload Speed)", + "buffs": [ + { + "type": "reloadTime", + "value": 0.7, + "buffType": "multiplicative" + } + ], + "appliesTo": "" + }, + { + "id": "Polatia-LMG-User-perk", + "label": "LMG User (+35% Damage)", + "buffs": [ + { + "type": "damage", + "value": 1.35, + "buffType": "multiplicative" + } + ], + "appliesTo": "LMG" + }, + { + "id": "focus-reload-perk", + "label": "Focus (+20% Reload Speed)", + "buffs": [ + { + "type": "reloadTime", + "value": 0.8, + "buffType": "multiplicative" + } + ], + "appliesTo": "" + }, + { + "id": "hollow-point-ammunition-damage-perk", + "label": "Hollow Point Ammunition (+10 Damage)", + "buffs": [ + { + "type": "damage", + "value": 10, + "buffType": "additive" + } + ], + "appliesTo": "" + } + ] + }, + { + "id": "pratva-executor", + "name": "Pratva Executor", + "category": "Polatia", + "modifiers": [ + { + "id": "undertaker-damage-perk", + "label": "Undertaker [SHOTGUN] (+30% Damage)", + "buffs": [ + { + "type": "damage", + "value": 1.3, + "buffType": "multiplicative" + } + ], + "appliesTo": "SHOTGUN" + }, + { + "id": "execute-damage-perk", + "label": "Execute (+40% Damage)", + "buffs": [ + { + "type": "damage", + "value": 1.4, + "buffType": "multiplicative" + } + ], + "appliesTo": "" + } + ] + }, + { + "id": "polatia-zero-day", + "name": "Zero Day", + "category": "Polatia" + }, + { + "id": "goc-goc", + "name": "GOC", + "category": "GOC", + "modifiers": [ + { + "id": "goc-special-ammo", + "label": "Special Ammo (+40% Damage)", + "buffs": [ + { + "type": "damage", + "value": 1.4, + "buffType": "multiplicative" + } + ], + "appliesTo": "" + }, + { + "id": "goc-weapon-expert-reload-perk", + "label": "Weapon Expert (-1s Reload Time)", + "value": -1, + "type": "additive", + "appliesTo": "" + } + ] + }, + { + "id": "goc-BD", + "name": "Broken Dagger", + "category": "GOC", + "modifiers": [ + { + "id": "BD-special-ammo", + "label": "Special Ammo (+40% Damage)", + "buffs": [ + { + "type": "damage", + "value": 1.4, + "buffType": "multiplicative" + } + ], + "appliesTo": "" + }, + { + "id": "BD-BED", + "label": "Break 'em down (+40% Damage, +40% Firerate, +100% Reload Speed)", + "buffs": [ + { + "type": "damage", + "value": 1.4, + "buffType": "multiplicative" + }, + { + "type": "rpm", + "value": 1.4, + "buffType": "multiplicative" + }, + { + "type": "reloadTime", + "value": 0, + "buffType": "multiplicative" + } + ], + "appliesTo": "" + }, + { + "id": "BD-Vengeance", + "label": "Vengeance (+35% Reload Speed)", + "buffs": [ + { + "type": "reloadTime", + "value": 0.65, + "buffType": "multiplicative" + } + ], + "appliesTo": "" + } + ] + }, + { + "id": "goc-SH", + "name": "Steelhead", + "category": "GOC", + "modifiers": [ + { + "id": "sh-silver", + "label": "Silver Ammo (+30% Damage, +20% Firerate)", + "buffs": [ + { + "type": "damage", + "value": 1.3, + "buffType": "multiplicative" + }, + { + "type": "rpm", + "value": 1.2, + "buffType": "multiplicative" + } + ], + "appliesTo": "" + }, + { + "id": "sh-hammer", + "label": "Hammer Ammo (+50% Damage, -30% Firerate)", + "buffs": [ + { + "type": "damage", + "value": 1.5, + "buffType": "multiplicative" + }, + { + "type": "rpm", + "value": 0.7, + "buffType": "multiplicative" + } + ], + "appliesTo": "" + }, + { + "id": "sh-hellfire", + "label": "Hellfire Ammo (-10% Firerate)", + "buffs": [ + { + "type": "rpm", + "value": 0.9, + "buffType": "multiplicative" + } + ], + "appliesTo": "" + }, + { + "id": "sh-weapon-expert-reload-perk", + "label": "Weapon Expert (-1s Reload Time)", + "value": -1, + "type": "additive", + "appliesTo": "" + } + ] + }, + { + "id": "goc-ambassador", + "name": "GOC Ambassador", + "category": "GOC", + "modifiers": [ + { + "id": "goca-civilian", + "label": "Civilian (-15% Damage)", + "buffs": [ + { + "type": "damage", + "value": 0.85, + "buffType": "multiplicative" + } + ], + "appliesTo": "" + } + ] + }, + { + "id": "goc-thaumaturge", + "name": "Thaumaturge", + "category": "GOC" + }, + { + "id": "goc-gs", + "name": "Gunslinger", + "category": "GOC", + "modifiers": [ + { + "id": "deep-focus-reload-perk", + "label": "Deep Focus (+50% Reload Speed)", + "buffs": [ + { + "type": "reloadTime", + "value": 0.5, + "buffType": "multiplicative" + } + ], + "appliesTo": "" + }, + { + "id": "bullet-hell-damage-perk", + "label": "Bullet Hell (+100% Damage)", + "buffs": [ + { + "type": "damage", + "value": 2, + "buffType": "multiplicative" + } + ], + "appliesTo": "" + }, + { + "id": "run-and-gun-damage-perk", + "label": "Run & Gun (+30% Firerate, +20% Reload Speed)", + "buffs": [ + { + "type": "rpm", + "value": 1.3, + "buffType": "multiplicative" + }, + { + "type": "reloadTime", + "value": 0.8, + "buffType": "multiplicative" + } + ], + "appliesTo": "" + }, + { + "id": "suppressive-fire-firerate-perk", + "label": "Hammer Ammo (+100% Firerate)", + "buffs": [ + { + "type": "rpm", + "value": 2, + "buffType": "multiplicative" + } + ], + "appliesTo": "" + } + ] + } + ] +} \ No newline at end of file diff --git a/static/populateTable.js b/static/populateTable.js index 5fb55e9..226ce85 100644 --- a/static/populateTable.js +++ b/static/populateTable.js @@ -1,8 +1,28 @@ document.addEventListener('DOMContentLoaded', () => { - fetch('/api/guns') + fetch('/static/json/data.json') // Fetch the JSON file directly .then(response => response.json()) .then(data => { - populateTable(data); + const updatedGuns = data.map(gun => { + const original_damage = gun['damage']; + const total_damage = original_damage * gun['damage_multiplier']; + const rps = gun['rpm'] / 60; + const dps = total_damage * rps; + const reload_time_min = gun['reload_time'] / 60; + const dpm = (gun['mag_size'] * total_damage) / (reload_time_min + (gun['mag_size'] / gun['rpm'])); + const avg_dps = dpm / 60; + + // Add the calculated stats to the gun object + return { + ...gun, + total_damage: total_damage, + rps: rps, + dps: dps, + dpm: dpm, + avg_dps: avg_dps + }; + }); + + populateTable(updatedGuns); }); }); @@ -11,16 +31,14 @@ function populateTable(data) { table.innerHTML = ''; // Clear existing table data data.forEach(gun => { const row = table.insertRow(); - row.insertCell(0).innerText = gun.id; - row.insertCell(1).innerText = gun.name; - row.insertCell(2).innerText = gun.total_damage; - row.insertCell(3).innerText = gun.rpm; - row.insertCell(4).innerText = gun.mag_size; - row.insertCell(5).innerText = gun.reload_time; - row.insertCell(6).innerText = gun.guntype; - row.insertCell(7).innerText = gun.rps.toFixed(2); - row.insertCell(8).innerText = gun.dps.toFixed(2); - row.insertCell(9).innerText = gun.dpm.toFixed(2); - row.insertCell(10).innerText = gun.avg_dps.toFixed(2); + row.insertCell(0).innerText = gun.name; + row.insertCell(1).innerText = gun.total_damage.toFixed(2); + row.insertCell(2).innerText = gun.rpm; + row.insertCell(3).innerText = gun.mag_size; + row.insertCell(4).innerText = gun.reload_time; + row.insertCell(5).innerText = gun.rps.toFixed(2); + row.insertCell(6).innerText = gun.dps.toFixed(2); + row.insertCell(7).innerText = gun.dpm.toFixed(2); + row.insertCell(8).innerText = gun.avg_dps.toFixed(2); }); -} \ No newline at end of file +} diff --git a/static/style.css b/static/style.css index 050a752..e11a0b2 100644 --- a/static/style.css +++ b/static/style.css @@ -1,9 +1,34 @@ +input[type="text"] { + width: 100%; + padding: 8px; + margin: 10px 0; + box-sizing: border-box; + font-size: 16px; +} + +#modifiers-container { + display: flex; + justify-content: space-between; /* Distribute space between the items */ + flex-wrap: wrap; /* Allow wrapping to avoid overflow */ +} + +/* Style for the modifiers section */ +#modifiers { + display: flex; /* Use flexbox for alignment */ + flex-direction: column; /* Stack items vertically */ + width: 50%; +} + +#abilities { + width: 42.5%; /* Adjust this value as needed */ +} + body { background-image: url("/static/img/trlbg1.jpg"); background-repeat: no-repeat; background-attachment: fixed; background-size: cover; - position: relative; /* This allows the z-index on children elements to work */ + position: relative; z-index: -1; /* Send the background behind the content */ font-family: Arial, sans-serif; margin: 20px; @@ -229,3 +254,135 @@ nav { .button1 { background-color: black; } + +/* Suggestion Form Enhancements */ +main h1 { + font-size: 2.5em; + color: black; + text-align: center; + margin-bottom: 20px; +} + +.suggestion-title { + font-size: 1.5em; + color: black; + text-align: center; + margin-bottom: 30px; +} + +article label { + font-weight: bold; + font-size: 1.1em; + color: #333; + margin-bottom: 10px; + display: block; +} + +input[type="text"], input[type="number"], textarea { + width: 95%; + padding: 12px; + font-size: 1em; + border: 1px solid #ccc; + border-radius: 8px; + margin-bottom: 20px; + background-color: #f9f9f9; + transition: border-color 0.3s, box-shadow 0.3s; +} + +/* Focus effect to highlight the active input field */ +input[type="text"]:focus, input[type="number"]:focus, textarea:focus { + border-color: black; + box-shadow: 0 0 5px darkred; + background-color: #fff; + outline: none; +} + +textarea { + resize: none; + height: 150px; +} + +/* Submit button improvements */ +.button1 { + background-color: darkred; + color: white; + font-size: 1.2em; + padding: 12px 24px; + border: none; + border-radius: 8px; + cursor: pointer; + display: block; + margin: 0 auto; + transition: background-color 0.3s ease, transform 0.3s ease; +} + +/* Button hover effect */ +.button1:hover { + background-color: #45a049; + transform: scale(1.05); +} + +/* Success message styling */ +#successMessage { + font-size: 1.1em; + color: green; + text-align: center; + margin-top: 20px; +} + +/* Adjustments for mobile responsiveness */ +@media screen and (max-width: 600px) { + input[type="text"], input[type="number"], textarea { + width: 80%; + font-size: 0.95em; + } + + .suggestion-title { + font-size: 1.2em; + } + + #modifiers { + width: 100%; /* Adjust this percentage to control the width */ + } + + #abilities { + width: 100%; + } + + /* Adjust spacing between different ability modifiers */ + #abilities label { + display: block; + margin-bottom: 10px; + line-height: 1.2; + white-space: nowrap; + } + + /* Optional: Adjust margin between checkbox and text */ + #abilities input[type="checkbox"] { + margin-right: 5px; + } +} + +/* Styling for horizontal table */ +.weapon-stats-table { + width: 100%; + border-collapse: collapse; + margin: 10px 0; +} + +.weapon-stats-table th, .weapon-stats-table td { + border: 1px solid #ddd; + padding: 8px; + text-align: center; /* Centers the text */ +} + +.weapon-stats-table th { + background-color: #f2f2f2; + color: black; +} + +/* Horizontal styling specifically for the table */ +.horizontal-table tr:first-child th { + text-align: center; + font-weight: bold; +} diff --git a/static/suggestion.js b/static/suggestion.js new file mode 100644 index 0000000..e527439 --- /dev/null +++ b/static/suggestion.js @@ -0,0 +1,96 @@ +const cooldownDuration = 10 * 360000; +const prohibitedWords = ['fuck', 'shit', 'asshole', 'bitch', 'bastard', 'damn', 'crap', 'dick', 'piss', 'cunt', 'motherfucker', 'douche', +'prick', 'whore', 'slut', 'fag', 'nigger', 'spic', 'retard', 'twat', 'bollocks', 'wanker', 'bugger', 'arse', +'shithead', 'dumbass', 'jackass', 'dipshit', 'dildo', 'knobhead', 'ballsack', 'buttfucker', 'cum', 'jizz', +'cocksucker', 'fucker', 'skank', 'pussy', 'tits', 'clit', 'schlong', 'dickhead', 'goddamn', 'hell', 'bitchass', +'fuckface', 'shitfaced', 'asshat', 'bint', 'chink', 'gook', 'jap', 'negro', 'dyke', 'queer', 'tranny', 'tosser', +'spaz', 'mong', 'coon', 'beaner', 'cracker', 'wetback', 'homo', 'fudgepacker', 'tard', 'cocks', 'bollocks', +'numbnuts', 'knob', 'muppet', 'git', 'shag', 'minge', 'git', 'bugger', 'tosser', 'nonce', 'plonker', 'pillock'] +; // Example word filtering + +// Function to get the last submission time from localStorage +function getLastSubmissionTime() { + const storedTime = localStorage.getItem('lastSubmissionTime'); + return storedTime ? parseInt(storedTime, 10) : 0; +} + +// Function to save the last submission time to localStorage +function setLastSubmissionTime(time) { + localStorage.setItem('lastSubmissionTime', time.toString()); +} + +function sendMessage() { + // Get the current time + const currentTime = Date.now(); + + // Retrieve the last submission time from localStorage + const lastSubmissionTime = getLastSubmissionTime(); + + // Cooldown logic to prevent spamming + if (currentTime - lastSubmissionTime < cooldownDuration) { + alert(`Please wait for ${cooldownDuration / 1000} seconds between submissions.`); + return; + } + + // Get the values from the input fields + const pseudoname = document.getElementById("name").value || "Anonymous"; + const rating = parseInt(document.getElementById("rate").value, 10); + const comment = document.getElementById("text").value.trim(); + + // Validation: Rating should be between 1 and 10 + if (isNaN(rating) || rating < 1 || rating > 10) { + alert("Rating must be a number between 1 and 10."); + return; + } + + // Validation: Comment length (min 5, max 500) and simple prohibited word check + if (comment.length < 5 || comment.length > 500) { + alert("Comment must be between 5 and 500 characters."); + return; + } + + // Check for prohibited words (basic check) + for (const word of prohibitedWords) { + if (comment.toLowerCase().includes(word)) { + alert("Your comment contains inappropriate content."); + return; + } + } + + // If all checks pass, send the message to the Discord webhook + const request = new XMLHttpRequest(); + request.open("POST", "https://discord.com/api/webhooks/1284936894890901649/Zi-2ZV12L1v1OSBoM-DluE1V1LECXilrNNRZYJcxelnwO7rGgXNH47dxvfFEOK7Fe9_J"); + request.setRequestHeader('Content-type', 'application/json'); + + // Create the content to send to the Discord webhook + const content = `**Rating:** ${rating}\n**Comment:**\n${comment}`; + + // Debugging information + console.log('Sending message with content:', content); + + // Send the message payload to the Discord webhook + const params = { + username: pseudoname, // Pseudoname will appear as the username + content: content // The combined content (pseudoname, rating, and comment) + }; + + request.send(JSON.stringify(params)); + + // Update the last submission time to the current time + setLastSubmissionTime(currentTime); + + // Optionally, you can reset the form after sending + document.getElementById("name").value = ""; + document.getElementById("rate").value = ""; + document.getElementById("text").value = ""; + + // Display the success message + const successMessage = document.getElementById("successMessage"); + successMessage.textContent = "Successfully sent the message!"; + successMessage.style.display = "block"; // Ensure the message is visible + + // Optionally hide the message after a few seconds + setTimeout(() => { + successMessage.style.display = "none"; // Hide message after 3 seconds + }, 3000); +} diff --git a/templates/about_us.html b/templates/about_us.html index d31efde..5a35788 100644 --- a/templates/about_us.html +++ b/templates/about_us.html @@ -57,7 +57,7 @@ TRL Community with an easy go-to way to calculate DPS and DPM values to help players make informed decisions about their gameplay. Whether you're fine-tuning your new Deathwish Strategy or simply curious about firearm performance, we’ve got you covered. If you have suggestions, feedback, or want to contribute new stats or - features, we’d love to hear from you, just contact us on Discord! + features, we’d love to hear from you, just contact us on Discord or on the Suggestion Page!

Our Story

@@ -85,7 +85,17 @@ (damage per second) and DPM (damage per minute) of each weapon via a formula that is also mentioned on Lanz1021' Spreadsheet.

How often are stats updated?

-

We update the weapon stats every time a new update is released for TRL.


+

We update the weapon stats every time a new update is released for TRL.

+

Special Thanks

+

+ gameknight90999(holdenn/holdenisch): For telling me what Sandevistan does. (The wiki doesn't tell what it does, lol)
+ delete(real_delete): For the info about the 'Weapon Expert' perk (I don't know where else I would've found that).
+ Epicdragon99999999(epicdog999): For helping me categorize WW2 and Soviet weapons (I don't think I would've thought about the PKM)
+ NocturnalAndrea(nocturnalandrea): For helping me categorize Semi-auto weapons (again, why isn't this listed on the wiki?)
+ Kris HD(krishd1337): For the motivation and help with finding bugs.
+ Lanz1021: For reviewing and giving feedback.
+ AND YOU!: We are thankful for every visitor we get on this website, and we hope you're enjoying it! +

Thank you for visiting TRL Stats.

diff --git a/templates/calculator.html b/templates/calculator.html index a019b09..4b03ab4 100644 --- a/templates/calculator.html +++ b/templates/calculator.html @@ -25,6 +25,22 @@ dropdownContent.style.display = "block"; } } + + // Collapsible functionality for perks, buffs, etc. + document.addEventListener('DOMContentLoaded', function () { + var coll = document.getElementsByClassName("collapsible-header"); + for (var i = 0; i < coll.length; i++) { + coll[i].addEventListener("click", function () { + this.classList.toggle("active"); + var content = this.nextElementSibling; + if (content.style.display === "block") { + content.style.display = "none"; + } else { + content.style.display = "block"; + } + }); + } + });
@@ -53,19 +69,49 @@
- + + +
+ +
+
+ + + + + + + + + + + + +
- + + +
+ +
+ +
- -
- -
+

Operative Specific Modifiers

+
+ + +
+
+
+
diff --git a/templates/index.html b/templates/index.html index 806743d..d48132e 100644 --- a/templates/index.html +++ b/templates/index.html @@ -55,13 +55,11 @@ - - diff --git a/templates/suggestion.html b/templates/suggestion.html index 554eb30..66fd282 100644 --- a/templates/suggestion.html +++ b/templates/suggestion.html @@ -63,34 +63,11 @@

+ + + - +
ID Name Damage Rounds per minute Magazine Size Reload timeGun type RPS DPS DPM