public void PossessAllyAdd() { if (AllyInCommand && PartyMembers.Count > 0) { int allyCommandIndex = PartyMembers.IndexOf(AllyInCommand); if (allyCommandIndex + 1 > 0 && allyCommandIndex + 1 < PartyMembers.Count) { SetAllyInCommand(PartyMembers[allyCommandIndex + 1]); } else if (PartyMembers.Count > 0) { SetAllyInCommand(PartyMembers[0]); } } }
public void PossessAllySubtract() { if (AllyInCommand && PartyMembers.Count > 0) { int allyCommandIndex = PartyMembers.IndexOf(AllyInCommand); int endIndex = PartyMembers.Count - 1; if (allyCommandIndex - 1 > -1 && allyCommandIndex - 1 < PartyMembers.Count) { SetAllyInCommand(PartyMembers[allyCommandIndex - 1]); } else if (endIndex > 0 && endIndex < PartyMembers.Count) { SetAllyInCommand(PartyMembers[endIndex]); } } }