-
Notifications
You must be signed in to change notification settings - Fork 68
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
Fix X2Effect_Brutal by using GetCurrentStat() instead of GetBaseStat() #1392
Conversation
@@ -11,7 +11,7 @@ simulated protected function OnEffectAdded(const out EffectAppliedData ApplyEffe | |||
TargetUnit = XComGameState_Unit(kNewTargetState); | |||
if (TargetUnit != none) | |||
{ | |||
CurrentWill = TargetUnit.GetBaseStat(eStat_Will); | |||
CurrentWill = TargetUnit.GetCurrentStat(eStat_Will); // issue 1389 |
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.
All Highlander submissions must follow the same comment convention.
For single line change, you would use // Single line for Issue #1389
, and for anything more than one line, you would use // Start Issue #1389
and // End Issue #1389
. Then there are Highlander inline docs, which get compiled automatically into this webpage: https://x2communitycore.github.io/X2WOTCCommunityHighlander/
They use a single /// HL-Docs:
entry, and there are two types of those, one is used to document features, so they can be easier used by mod authors, and other uses to document bugfixes, and these are meant for mod users, and all get compiled into a single page: https://x2communitycore.github.io/X2WOTCCommunityHighlander/Bugfixes/
In case of single line bugfixes, it is acceptable to use a HL-Docs entry instead of "single line for issue".
Only one HL-Docs entry per issue is needed normally.
In this case comments would look like:
/// HL-Docs: ref:Bugfixes; issue:1389
/// Make `X2Effect_Brutal` use unit's current Will instead of base Will so it can properly reduce it.
// Single line for Issue #1389 - use GetCurrentStat() instead of GetBaseStat().
CurrentWill = TargetUnit.GetCurrentStat(eStat_Will);
and
// Single line for Issue #1389 - use GetCurrentStat() instead of GetBaseStat().
WillChange = NewUnit.GetCurrentStat(eStat_Will) - OldUnit.GetCurrentStat(eStat_Will);
Perfect, though a bit annoyingly I have to ask you to squish the last two commits together, so there's still one commit with adding new files, and one commit where the issue gets actually resolved. This can be done via |
92442bc
to
238ac26
Compare
Fixes #1389
Fixes Brutal effect by using GetCurrentStat() instead of GetBaseStat().