.Resources.MaxHealth;
                        entity.Resources.CurrentMana = entity.Resources.MaxMana;

                        if (!dontIncrementActionPoints) IncreaseActionPoints(entity);
                        
                        if (isAttacker) _numOfAttackers++;
                        else _numOfDefenders++;
                    }
                }
            }
        }

        /// <summary>
        /// Removes all combat effects from all CombatEntities in a formation to prepare to exit combat.
        /// </summary>
        /// <param name="formation">The Formation to sanitize.</param>
        private void SanitizeFormation(Formation formation)
        {
            lock (_key)
            {
                foreach (var row in formation.Positions)
                {
                    foreach (var entity in row)
                    {
                        if (entity == null) continue;
                        entity.Resources.CurrentActionPoints = 0;
                        _statusEffectManager.RemoveAll(entity);
                    }
                }
            }
        }

        /// <summary>
        /// Given a Formation, returns a List of the CombatEntities with the most action points and are
        /// also able to act in battle.
        /// <para>Returns a maximum of GameplayConstants.MaxActionsPerTurn entities.</para>
        /// </summary>
        /// <param name="formation">The Formation to get active entities from.</param>
        /// <returns></returns>
        private List<CombatEntity> ChooseActiveEntities(Formation formation)
        {
            lock (_key)
            {
                var candidates = formation.Positions.WhereTwoD(entity =>
                {
                    if (entity == null) return false;
                    if (entity.Resources.CurrentActionPoints <= 0 || entity.Resources.CurrentHealth <= 0) return false;
                    if (entity.StatusEffects.Any(se => se.BaseStatus.IsStunned)) return false;
                    return true;
                });

                candidates = candidates.OrderByDescending(entity => entity.Resources.CurrentActionPoints);
                if (candidates.Count() <= GameplayConstants.MaxActionsPerTurn) return candidates.ToList();
                else return candidates.Take(GameplayConstants.MaxActionsPerTurn).ToList();
            }
        }

        /// <summary>
        /// Gets the next active entity if an entity passes its turn to another.
        /// <para>Returns null if there are no entities that can act.</para>
        /// </summary>
        /// <param name="formation">The Formation to get the next active entity from.</param>
        /// <param name="activeEntities">The entities that are currently active.</param>
        /// <returns></returns>
        private CombatEntity GetNextActiveEntity(Formation formation, List<CombatEntity> activeEntities)
        {
            lock (_key)
            {
                var candidates = formation.Positions.WhereTwoD(ent =>
                {
                    if (ent == null) return false;
                    if (activeEntities.Contains(ent)) return false;
                    if (ent.Resources.CurrentActionPoints <= 0 || ent.Resources.CurrentHealth <= 0) return false;
                    if (ent.StatusEffects.Any(se =>
                    {
                        if (se.BaseStatus.IsStunned) return true;
                        if (se.BaseStatus.Id == GameplayConstants.DefendingStatusEffectId) return true;
                        if (se.BaseStatus.Id == GameplayConstants.FleeingStatusEffectId) return true;
                        return false;
                    })) return false;

                    return true;
                });

                if (candidates == null || candidates.Count() == 0) return null;
                return candidates.OrderByDescending(entity => entity.Resources.CurrentActionPoints).First();
            }
        }

        /// <summary>
        /// Increases action points for a CombatEntity based on its action point regeneration.
        /// </summary>
        /// <param name="entity">The CombatEntity whose action points should be increased.</param>
        private ActionPointData IncreaseActionPoints(CombatEntity entity)
        {
            lock (_key)
            {
                if (entity == null) return null;
                if (entity.Resources.CurrentHealth <= 0 || entity.StatusEffects.Any(se => se.BaseStatus.IsStunned)) return null;

                int randPoints = _seed.Next(0, entity.SecondaryStats.BonusActionPoints);
                int total = GameplayConstants.ActionPointsPerTurn + randPoints;
                total += total * entity.SecondaryStats.BonusActionPointsPercentage / 100;
                entity.Resources.CurrentActionPoints += total;

                return new ActionPointData
                {
                    EntityId = entity.Id,
                    CurrentActionPoints = entity.Resources.CurrentActionPoints
                };
            }
        }

        /// <summary>
        /// Increases action points for every CombatEntity that is able in a Formation.
        /// </summary>
        /// <param name="formation">The Formation to get the CombatEntities from.</param>
        private IEnumerable<ActionPointData> IncreaseActionPoints(Formation formation)
        {
            lock (_key)
            {
                var actionPointData = new List<ActionPointData>();

                foreach (var row in formation.Positions)
                {
                    foreach (var entity in row)
                    {
                        var data = IncreaseActionPoints(entity);
                        if (data!= null) actionPointData.Add(data);
                    }
                }

                return actionPointData;
            }
        }

        /// <summary>
        /// Applies StatusEffects, if any, to all CombatEntities in a Formation. Removes them accordingly.
        /// </summary>
        /// <param name="formation">The Formation to apply StatusEffects to.</param>
        /// <returns>Returns an IEnumerable of CombatEntities affected by StatusEffect changes.</returns>
        private IEnumerable<CombatEntity> ApplyStatusEffects(Formation formation)
        {
            var affectedEntities = new List<CombatEntity>();
            var entities = formation.Positions.Flatten()
                                             .Where(e => e!= null && e.Resources.CurrentHealth > 0)
                                             .Where(e => e.StatusEffects.Count > 0)
                                             .ToList();

            foreach (var entity in entities)
            {
                _statusEffectManager.ApplyEffects(entity);
                affectedEntities.Add(entity);
            }
            return affectedEntities;
        }

        /// <summary>
        /// Returns the current battle instance.
        /// </summary>
        /// <returns></returns>
        public IReadOnlyBattle GetBattle()
        {
            lock (_key)
            {
                return _battle;
            }
        }

        /// <summary>
        /// Returns the ids of all players in the current battle.
        /// </summary>
        /// <returns></returns>
        public IEnumerable<string> GetParticipantIds()
        {
            lock (_key)
            {
                return _participantIds.Where(id => id!= GameplayConstants.AiId.ToString()).ToList();
            }
        }
    }
}
Leading Estonian journalist Anvar Samost evaluated on April 7 that reports on Estonian beneficiaries and companies mentioned in the Panama Papers have currently not been published since Estonian media are not part of ICIJ, the consortium, which published the Panama Papers.
ERR quoted Anvar Samost, the former director of Postimees and the Baltic News Service, as saying to ETV on April 7 that he was surprised that no Estonian journalist had had any news to report concerning the Panama Papers.
The International Consortium of Investigative Journalists (ICIJ) put the numbers of connections of Panama’s law firm Mossack Fonseca for Estonia at seven clients, 22 beneficiaries, 80 shareholders and 880 companies.
Speaking about the numbers related to Estonia, Samost commented that the 22 beneficiaries mentioned on ICIJ’s site were the most interesting point. «This means that there’s a good chance that there will be some well-known names on this list once it becomes public».
Reportedly, the Panama documents mention the names of some of Latvia’s famous and infamous people, including Aivars Lembergs, businessman Ainars Gulbis and his son, tennis player Ernests Gulbis, airBaltic’s new investor Ralf-Dieter Montag-Girmes, founder of Lido Gunars Kirsons and others, as reported by Re:Baltica.
As noted by the investigative journalism company, there are 15,951 entries in the leaked database concerning Latvia. This is largely because clients of Mossack Fonseca had accounts in Latvian banks servicing non-residents. Some of the actual beneficiaries and shareholders mentioned as linked to Latvia are citizens of Russia and former CIS countries. Some are mostly unknown people, and publishing their names would serve no purpose, as using services of foreign companies is not a crime, Re:Balt