In MoveInfo.cs, find the first line, add the second line
public float gaugeRequired;
public float gaugeLimit;
In MoveEditorWindow.cs, find the first line, add the second line
moveInfo.gaugeRequired = StyledSlider("Gauge Required (%)", moveInfo.gaugeRequired, EditorGUI.indentLevel, 0, 100);
moveInfo.gaugeLimit = StyledSlider("Gauge Limit (%)", moveInfo.gaugeLimit, EditorGUI.indentLevel, 0, 100);
In MoveSetScript.cs, we have a few things to change/add.
Find the first function, add the second function
private bool hasEnoughGauge(float gaugeNeeded){
if (!UFE.config.gameGUI.hasGauge) return true;
if (controlsScript.myInfo.currentGaugePoints < (controlsScript.myInfo.maxGaugePoints * (gaugeNeeded / 100))) return false;
return true;
}
private bool hasTooMuchGauge(float gaugeLimit){
if (!UFE.config.gameGUI.hasGauge) return true;
if ((gaugeLimit > 0 ) && (controlsScript.myInfo.currentGaugePoints >= (controlsScript.myInfo.maxGaugePoints * (gaugeLimit / 100)))) return true;
return false;
}
Find this function
public MoveInfo GetNextMove(MoveInfo currentMove){
and replace
return InstantiateMove(move);
with
if (!hasEnoughGauge(move.gaugeRequired) || hasTooMuchGauge(move.gaugeLimit)) continue;
return InstantiateMove(move);
This also fixes a bug where move links would execute even when the gauge requirement was not met.
Find this function
public bool ValidateMoveExecution(MoveInfo move) {
Find this line
if (!hasEnoughGauge(move.gaugeRequired)) return false;
and replace with this
if (!hasEnoughGauge(move.gaugeRequired) || hasTooMuchGauge(move.gaugeLimit)) return false;
Find this function
private MoveInfo TestMoveExecution(MoveInfo move, MoveInfo currentMove, ButtonPress[] buttonPress, bool inputUp, bool fromSequence, bool forceExecution) {
same as above, find this line(should be first)
if (!hasEnoughGauge(move.gaugeRequired)) return null;
and replace with this
if (!hasEnoughGauge(move.gaugeRequired) || hasTooMuchGauge(move.gaugeLimit)) return null;
I believe that's everything. Now in the move editor window you should have a new slider called Gauge Limit. I would set your helper to require 50 gauge and cost 50 gauge, with a gauge limit of 0. Have the default Heavy move require and cost 0 gauge, but put a gauge limit of .1(or anything over 0 should probably work).
For the GUI, you could just track total gauge / gauge left, which should give you either 2, 1, or 0, and setup your icons to show depending on the value returned.