From 63ed225d93f73955ec85bd4a869b78fab030b92c Mon Sep 17 00:00:00 2001 From: matsu1213 Date: Sat, 21 Sep 2024 14:57:50 +0900 Subject: [PATCH] backstab --- src/main/java/net/azisaba/leoncsaddon/WeaponConfig.java | 3 ++- src/main/java/net/azisaba/leoncsaddon/WeaponConfigData.java | 4 +++- .../net/azisaba/leoncsaddon/WeaponCustomDamageListener.java | 3 +++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/main/java/net/azisaba/leoncsaddon/WeaponConfig.java b/src/main/java/net/azisaba/leoncsaddon/WeaponConfig.java index fef3310..3261751 100644 --- a/src/main/java/net/azisaba/leoncsaddon/WeaponConfig.java +++ b/src/main/java/net/azisaba/leoncsaddon/WeaponConfig.java @@ -47,6 +47,7 @@ public void init(){ double damage = configuration.getDouble(key + ".damage",0); double headshotBonusDamage = configuration.getDouble(key + ".headshotBonusDamage",0); double criticalBonusDamage = configuration.getDouble(key + ".criticalBonusDamage",0); + double backstabBonusDamage = configuration.getDouble(key + ".backstabBonusDamage", 0); double guardMult = configuration.getDouble(key + ".guardMult",1.0); float walkSpeed = (float) configuration.getDouble(key + ".walkSpeed",0.2); boolean canSprint = configuration.getBoolean(key + ".canSprint",false); @@ -77,7 +78,7 @@ public void init(){ } } - weaponsMap.put(key,new WeaponConfigData(key, type, isMain, requirements, damage, headshotBonusDamage, criticalBonusDamage, guardMult, walkSpeed, canSprint, reduceStartTick, reduceEndTick, reduceDamage, projectileSizeXZ, projectileSizeY, potionEffectList)); + weaponsMap.put(key,new WeaponConfigData(key, type, isMain, requirements, damage, headshotBonusDamage, criticalBonusDamage, backstabBonusDamage, guardMult, walkSpeed, canSprint, reduceStartTick, reduceEndTick, reduceDamage, projectileSizeXZ, projectileSizeY, potionEffectList)); }); } diff --git a/src/main/java/net/azisaba/leoncsaddon/WeaponConfigData.java b/src/main/java/net/azisaba/leoncsaddon/WeaponConfigData.java index 5f7cd96..00c3ea7 100644 --- a/src/main/java/net/azisaba/leoncsaddon/WeaponConfigData.java +++ b/src/main/java/net/azisaba/leoncsaddon/WeaponConfigData.java @@ -13,6 +13,7 @@ public class WeaponConfigData { public final double damage; public final double headshotBonusDamage; public final double criticalBonusDamage; + public final double backstabBonusDamage; public final double projectileSizeXZ; public final double projectileSizeY; @@ -26,7 +27,7 @@ public class WeaponConfigData { public final int reduceEndTick; public final double reduceDamage; - public WeaponConfigData(String name, List type, boolean isMain, List requirements, double damage, double headshotBonusDamage, double criticalBonusDamage, double guardMult, float walkSpeed, boolean canSprint, int reduceStartTick, int reduceEndTick, double reduceDamage, double projectileSizeXZ, double projectileSizeY, List potionEffectList){ + public WeaponConfigData(String name, List type, boolean isMain, List requirements, double damage, double headshotBonusDamage, double criticalBonusDamage, double backstabBonusDamage, double guardMult, float walkSpeed, boolean canSprint, int reduceStartTick, int reduceEndTick, double reduceDamage, double projectileSizeXZ, double projectileSizeY, List potionEffectList){ this.type = type; this.isMain = isMain; this.requirements = requirements; @@ -34,6 +35,7 @@ public WeaponConfigData(String name, List type, boolean isMain, List