public void AssignCurrentAction(int allActionIndex) { GambitAction option = AllActions[allActionIndex]; UnitToShow.GambitRules[GambitRuleIndexToModify].GambitAction = option; UnitToShow.GambitsChanged(); ConstructGambitRuleUI(); // CloseFlyouts(); }
public override bool IsConditionMet(Unit instigator, GambitRule currentRule) { int maxPartySize = GameManager.Instance.CurrentPartyMembers.Count; if (currentRule.GambitAction == currentAction && currentIndex < maxPartySize) { //same action, assign a target, if needed continuing where we left off the last time when this rule was used. ResultUnit = GameManager.Instance.GetPartyMembers()[currentIndex]; currentIndex++; return(true); } else if (currentAction != currentRule.GambitAction) { //different action (probably a buff or heal) so we save the action and start counting from the first party member in the list again currentAction = currentRule.GambitAction; currentIndex = 0; ResultUnit = GameManager.Instance.GetPartyMembers()[currentIndex]; currentIndex++; return(true); } return(false); }