Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
Grasscutter
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
ziqian zhang
Grasscutter
Commits
2e167d2d
Commit
2e167d2d
authored
3 years ago
by
ImmuState
Committed by
Melledy
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Add energy generation probabilities to WeaponType.
parent
52a3f957
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main/java/emu/grasscutter/game/managers/EnergyManager/EnergyManager.java
+1
-1
1 addition, 1 deletion
...rasscutter/game/managers/EnergyManager/EnergyManager.java
src/main/java/emu/grasscutter/game/props/WeaponType.java
+5
-5
5 additions, 5 deletions
src/main/java/emu/grasscutter/game/props/WeaponType.java
with
6 additions
and
6 deletions
src/main/java/emu/grasscutter/game/managers/EnergyManager/EnergyManager.java
+
1
−
1
View file @
2e167d2d
...
@@ -256,7 +256,7 @@ public class EnergyManager {
...
@@ -256,7 +256,7 @@ public class EnergyManager {
// - Does the probability for a character reset when switching them out?
// - Does the probability for a character reset when switching them out?
// - Does this really count every individual hit separately?
// - 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
();
WeaponType
weaponType
=
avatar
.
getAvatar
().
getAvatarData
().
getWeaponType
();
// Check if we already have probability data for this avatar. If not, insert it.
// Check if we already have probability data for this avatar. If not, insert it.
...
...
This diff is collapsed.
Click to expand it.
src/main/java/emu/grasscutter/game/props/WeaponType.java
+
5
−
5
View file @
2e167d2d
...
@@ -9,7 +9,7 @@ import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap;
...
@@ -9,7 +9,7 @@ import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap;
public
enum
WeaponType
{
public
enum
WeaponType
{
WEAPON_NONE
(
0
),
WEAPON_NONE
(
0
),
WEAPON_SWORD_ONE_HAND
(
1
),
WEAPON_SWORD_ONE_HAND
(
1
,
10
,
5
),
WEAPON_CROSSBOW
(
2
),
WEAPON_CROSSBOW
(
2
),
WEAPON_STAFF
(
3
),
WEAPON_STAFF
(
3
),
WEAPON_DOUBLE_DAGGER
(
4
),
WEAPON_DOUBLE_DAGGER
(
4
),
...
@@ -18,10 +18,10 @@ public enum WeaponType {
...
@@ -18,10 +18,10 @@ public enum WeaponType {
WEAPON_STICK
(
7
),
WEAPON_STICK
(
7
),
WEAPON_SPEAR
(
8
),
WEAPON_SPEAR
(
8
),
WEAPON_SHIELD_SMALL
(
9
),
WEAPON_SHIELD_SMALL
(
9
),
WEAPON_CATALYST
(
10
),
WEAPON_CATALYST
(
10
,
0
,
10
),
WEAPON_CLAYMORE
(
11
),
WEAPON_CLAYMORE
(
11
,
0
,
10
),
WEAPON_BOW
(
12
),
WEAPON_BOW
(
12
,
0
,
5
),
WEAPON_POLE
(
13
);
WEAPON_POLE
(
13
,
0
,
4
);
private
final
int
value
;
private
final
int
value
;
private
int
energyGainInitialProbability
;
private
int
energyGainInitialProbability
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment