Exemplo n.º 1
0
 private PartyState GetPartyState(PartyBase party)
 {
     if (!PartyStates.TryGetValue(party.Id, out PartyState partyState))
     {
         partyState            = new PartyState(this, party.Side == BattleSideEnum.Attacker);
         PartyStates[party.Id] = partyState;
         for (int index = 0; index < party.MemberRoster.Count; ++index)
         {
             TroopRosterElement elementCopyAtIndex = party.MemberRoster.GetElementCopyAtIndex(index);
             CharacterObject    troop = elementCopyAtIndex.Character;
             if (troop != null)
             {
                 partyState.RegisterTroops(troop, (elementCopyAtIndex.Number - elementCopyAtIndex.WoundedNumber));
             }
         }
     }
     return(partyState);
 }
Exemplo n.º 2
0
        public bool ApplyDamageToPartyTroop(PartyAttackComposition attack, PartyBase party, CharacterObject troop, out float damage)
        {
            PartyState partyState = GetPartyState(party);

            return(partyState.ApplyDamageToTroop(attack, troop, out damage));
        }
Exemplo n.º 3
0
        public PartyAttackComposition MakePartyAttack(PartyBase party, float consumption)
        {
            PartyState partyState = GetPartyState(party);

            return(partyState.MakePartyAttack(consumption));
        }
Exemplo n.º 4
0
        public float GetPartyStrength(PartyBase party)
        {
            PartyState partyState = GetPartyState(party);

            return(partyState.GetCurrentStrength());
        }