-
Notifications
You must be signed in to change notification settings - Fork 10
fix: Make lone wolf perk into toggle #149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -308,7 +308,7 @@ fn hash_to_perk_option_data(_hash: u32) -> Option<PerkOptionData> { | |
| //episode 2 | year 7 | ||
| Perks::AirTrigger => Some(PerkOptionData::toggle()), | ||
| Perks::ClosingTime => Some(PerkOptionData::options(["Base", "Max Effect"].to_vec())), | ||
| Perks::LoneWolf => Some(PerkOptionData::options(["Base", "Alone"].to_vec())), | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree that it is a two state perk and it did always bother me about the 'none' option but seeing this pr reminded me of the options_raw perk option as well. It's basically the same as options but doesnt include a none by default so _input.value = 0 is whatever the first value you give is. A toggle in our current UX usually means no effect so thats why i think this option fits a little better than a toggle.
|
||
| Perks::LoneWolf => Some(PerkOptionData::toggle()), | ||
| Perks::SplicerSurge => Some(PerkOptionData::stacking(3)), | ||
|
|
||
| //episode 3 | year 7 | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -76,29 +76,24 @@ pub fn year_7_perks() { | |
| Box::new(|_input: ModifierResponseInput| -> HashMap<u32, i32> { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we've been adding in clamped values simply as a protection from editing the value in the url or otherwise. it would look like this as an end result. |
||
| let mut stats = HashMap::new(); | ||
| let enhance_buff = if _input.is_enhanced { 1 } else { 0 }; | ||
| if _input.value > 0 { | ||
| stats.insert( | ||
| StatHashes::AIRBORNE.into(), | ||
| (15 + 2 * enhance_buff) * _input.value as i32, | ||
| ); | ||
| stats.insert( | ||
| StatHashes::AIM_ASSIST.into(), | ||
| (5 + enhance_buff) * _input.value as i32, | ||
| ); | ||
| } | ||
| stats.insert( | ||
| StatHashes::AIRBORNE.into(), | ||
| (15 + 2 * enhance_buff) * (_input.value + 1) as i32, | ||
| ); | ||
| stats.insert( | ||
| StatHashes::AIM_ASSIST.into(), | ||
| (5 + enhance_buff) * (_input.value + 1) as i32, | ||
| ); | ||
| stats | ||
| }), | ||
| ); | ||
| add_hmr( | ||
| Perks::LoneWolf, | ||
| Box::new( | ||
| |_input: ModifierResponseInput| -> HandlingModifierResponse { | ||
| if _input.value == 0 { | ||
| HandlingModifierResponse::default(); | ||
| } | ||
| let enhance_buff = if _input.is_enhanced { 0.05 } else { 0.0 }; | ||
| HandlingModifierResponse { | ||
| ads_scale: 1.0 - (0.1 * _input.value as f64) - enhance_buff, | ||
| ads_scale: 0.9 - (0.1 * _input.value as f64) - enhance_buff, | ||
| ..Default::default() | ||
| } | ||
| }, | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure if this is needed as this was automatically changed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lol yes :) please always include this file with your prs.