Skip to content

Commit

Permalink
fix: enlightened action
Browse files Browse the repository at this point in the history
  • Loading branch information
JayAndromeda committed Apr 29, 2024
1 parent 64b906f commit 5f903d8
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 15 deletions.
2 changes: 1 addition & 1 deletion build_resources/cached_build.ron
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
(
last_manifest_version: "225174.24.04.10.1730-2-bnet.54923",
last_manifest_version: "225295.24.04.17.1730-2-bnet.55003",
dim_perk_mappings: [
(23371658, 2551157718),
(64332393, 2428997981),
Expand Down
2 changes: 1 addition & 1 deletion src/perks/perk_options_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ fn hash_to_perk_option_data(_hash: u32) -> Option<PerkOptionData> {
Perks::LooseChange => Some(PerkOptionData::toggle()),
Perks::HighGround => Some(PerkOptionData::toggle()),
Perks::HeadRush => Some(PerkOptionData::toggle()),
Perks::EnlightendAction => Some(PerkOptionData::stacking(5)),
Perks::EnlightendAction => Some(PerkOptionData::stacking(12)),
Perks::SwordLogic => Some(PerkOptionData::stacking(4)),
//season 23 | year 6
Perks::Onslaught => Some(PerkOptionData::stacking(3)),
Expand Down
83 changes: 70 additions & 13 deletions src/perks/year_6_perks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -436,13 +436,32 @@ pub fn year_6_perks() {
|_input: ModifierResponseInput| -> HashMap<BungieHash, StatBump> {
let shots_hit = _input.calc_data.total_shots_hit as i32;
let value = _input.value as i32;
let stat_per_stack = 10;
let max_stacks = 5;
let max_stacks = 12;
let stacks_per_hit = match _input.calc_data.weapon_type {
WeaponType::HANDCANNON => 3,
_ => 1,
};
let stacks = clamp(value + (shots_hit * stacks_per_hit), 0, max_stacks);

let stat_bump = clamp(value + shots_hit, 0, max_stacks) * stat_per_stack;
let buff = match stacks {
0 => 0,
1 => 2,
2 => 7,
3 => 12,
4 => 15,
5 => 20,
6 => 25,
7 => 30,
8 => 35,
9 => 38,
10 => 40,
11 => 45,
12 => 50,
_ => 50,
};
HashMap::from([
(StatHashes::RELOAD.into(), stat_bump),
(StatHashes::HANDLING.into(), stat_bump),
(StatHashes::RELOAD.into(), buff),
(StatHashes::HANDLING.into(), buff),
])
},
),
Expand All @@ -453,12 +472,31 @@ pub fn year_6_perks() {
|_input: ModifierResponseInput| -> HandlingModifierResponse {
let shots_hit = _input.calc_data.total_shots_hit as i32;
let value = _input.value as i32;
let stat_per_stack = 10;
let max_stacks = 5;
let max_stacks = 12;
let stacks_per_hit = match _input.calc_data.weapon_type {
WeaponType::HANDCANNON => 3,
_ => 1,
};
let stacks = clamp(value + (shots_hit * stacks_per_hit), 0, max_stacks);

let stat_bump = clamp(value + shots_hit, 0, max_stacks) * stat_per_stack;
let buff = match stacks {
0 => 0,
1 => 2,
2 => 7,
3 => 12,
4 => 15,
5 => 20,
6 => 25,
7 => 30,
8 => 35,
9 => 38,
10 => 40,
11 => 45,
12 => 50,
_ => 50,
};
HandlingModifierResponse {
stat_add: stat_bump,
stat_add: buff,
..Default::default()
}
},
Expand All @@ -469,12 +507,31 @@ pub fn year_6_perks() {
Box::new(|_input: ModifierResponseInput| -> ReloadModifierResponse {
let shots_hit = _input.calc_data.total_shots_hit as i32;
let value = _input.value as i32;
let stat_per_stack = 10;
let max_stacks = 5;
let max_stacks = 12;
let stacks_per_hit = match _input.calc_data.weapon_type {
WeaponType::HANDCANNON => 3,
_ => 1,
};
let stacks = clamp(value + (shots_hit * stacks_per_hit), 0, max_stacks);

let stat_bump = clamp(value + shots_hit, 0, max_stacks) * stat_per_stack;
let buff = match stacks {
0 => 0,
1 => 2,
2 => 7,
3 => 12,
4 => 15,
5 => 20,
6 => 25,
7 => 30,
8 => 35,
9 => 38,
10 => 40,
11 => 45,
12 => 50,
_ => 50,
};
ReloadModifierResponse {
reload_stat_add: stat_bump,
reload_stat_add: buff,
..Default::default()
}
}),
Expand Down

0 comments on commit 5f903d8

Please sign in to comment.