From 2e167d2d7877500021101542f17fe8c1dab23ec4 Mon Sep 17 00:00:00 2001 From: ImmuState Date: Mon, 30 May 2022 05:28:11 -0700 Subject: [PATCH] Add energy generation probabilities to WeaponType. --- .../game/managers/EnergyManager/EnergyManager.java | 2 +- .../java/emu/grasscutter/game/props/WeaponType.java | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/emu/grasscutter/game/managers/EnergyManager/EnergyManager.java b/src/main/java/emu/grasscutter/game/managers/EnergyManager/EnergyManager.java index e2328b178..1f80e7cb7 100644 --- a/src/main/java/emu/grasscutter/game/managers/EnergyManager/EnergyManager.java +++ b/src/main/java/emu/grasscutter/game/managers/EnergyManager/EnergyManager.java @@ -256,7 +256,7 @@ public class EnergyManager { // - Does the probability for a character reset when switching them out? // - Does this really count every individual hit separately? - // Make sure the avatar's weapon type makes sense. + // Get the avatar's weapon type. WeaponType weaponType = avatar.getAvatar().getAvatarData().getWeaponType(); // Check if we already have probability data for this avatar. If not, insert it. diff --git a/src/main/java/emu/grasscutter/game/props/WeaponType.java b/src/main/java/emu/grasscutter/game/props/WeaponType.java index 86e576875..11654464f 100644 --- a/src/main/java/emu/grasscutter/game/props/WeaponType.java +++ b/src/main/java/emu/grasscutter/game/props/WeaponType.java @@ -9,7 +9,7 @@ import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap; public enum WeaponType { WEAPON_NONE (0), - WEAPON_SWORD_ONE_HAND (1), + WEAPON_SWORD_ONE_HAND (1, 10, 5), WEAPON_CROSSBOW (2), WEAPON_STAFF (3), WEAPON_DOUBLE_DAGGER (4), @@ -18,10 +18,10 @@ public enum WeaponType { WEAPON_STICK (7), WEAPON_SPEAR (8), WEAPON_SHIELD_SMALL (9), - WEAPON_CATALYST (10), - WEAPON_CLAYMORE (11), - WEAPON_BOW (12), - WEAPON_POLE (13); + WEAPON_CATALYST (10, 0, 10), + WEAPON_CLAYMORE (11, 0, 10), + WEAPON_BOW (12, 0, 5), + WEAPON_POLE (13, 0, 4); private final int value; private int energyGainInitialProbability;