Closed korgano closed 6 years ago
Sure, we can add a config flag to prevent it.
Some considerations:
BattleData.DirectTransferInfo.IsDirectMissionTransfer
.BattleData.DirectTransferInfo.TransferredUnitStats
.Possible solution: whenever the unit detects that it is spawned the first time in a mission sequence, it stores a Unit Value with its current will stat. If the config flag is not enabled, it stores it always when tactical play begins for this unit.
This unit value is then checked by XComGameStateContext_WillRoll instead of naively assuming that the start state contains the starting will.
This hasn't been solved for base WOTC yet, but since the Highlander is replacing the will roll script file anyway, I figure it would be easier to implement a fix here.
This is the code directly involved in the will roll on mission start:
Here's a list of secondary and tertiary mission part names:
I think changing
if(RollInfo.MaxWillPercentageLostPerMission > 0)
toif(RollInfo.MaxWillPercentageLostPerMission > 0 && MissionTemplate != 'LostAndAbandonedC' || etc...)
might work, but that wouldn't easily expandable if modders implemented multi-part missions of their own.