internal void EnemyAttack(IEnemyAttack move) { Console.WriteLine($"{GetType().Name} - EnemyAttack - {TurnSystem.Active} - {move} on {Heroes.First()}"); var sequence = ActionCommandCenter.FetchSequence(); move.Execute(TurnSystem.Active, Heroes.First(), sequence, () => { Console.WriteLine($"{GetType().Name} - move Execute "); TurnSystem.End(); TurnSystem.ExcuteTurn(); Console.WriteLine($"EnemyAttack - End"); }); }
public void EndTurn() { Console.WriteLine($"{GetType().Name} - ExecuteOption - End"); TurnSystem.End(); while (TurnSystem.Active is Enemy enemy && !enemy.IsDead && enemy.EnemyType != EnemyType.Enviroment) { enemyAISysytem.ExecuteEnemyTurn(this, TurnSystem.Active); } TargetSystem.Cleanup(); if (Enemies.TrueForAll(enemy => enemy.IsDead)) { BattleStateStore.State = BattleState.ENDED; Enemies.ForEach(enemy => enemy.OnKilled -= Enemy_OnKilled); } ActionMenu.Process(); HealthCounter.Show(); }