private void AddTroops() { Debug.WriteLine("adding troops, count: " + troopRosterRemovedTroops.Count()); MobileParty heroParty = MobileParty.MainParty; TroopRoster troops = heroParty.MemberRoster; troops.Add(troopRosterRemovedTroops); troopRosterRemovedTroops = new TroopRoster(); areTroopsRemoved = false; }
private void outputRoster(TroopRoster roster) { for (int i = 0; i < roster.Count(); i++) { CharacterObject troop = roster.GetCharacterAtIndex(i); Debug.WriteLine("roster member: " + troop.Name + ", count: " + roster.GetTroopCount(troop)); } }
internal void MakeFreedHeroesEscape(TroopRoster freedTroops) { for (int i = freedTroops.Count <TroopRosterElement>() - 1; i >= 0; i--) { CharacterObject characterAtIndex = freedTroops.GetCharacterAtIndex(i); if (characterAtIndex.IsHero) { if (!characterAtIndex.IsPlayerCharacter) { EndCaptivityAction.ApplyByReleasedAfterBattle(characterAtIndex.HeroObject, null, null); } freedTroops.RemoveTroop(characterAtIndex, 1, new UniqueTroopDescriptor(), 0); } } }