private void SetupEnemyEncounter() { BattleLog.Write("Setting Up Enemies"); if (state.HasCustomEnemyEncounter) { BattleLog.Write("Setting Up Custom Encounter"); state.SetupEnemyEncounter(); } if (enemyArea.Enemies.Length == 0) { BattleLog.Write("Setting Up Fallback Random Encounter"); enemyArea = enemyArea.Initialized(encounterBuilder.Generate(3)); } foreach (var enemy in enemyArea.Enemies) { if (!enemy.IsReadyForPlay) { throw new Exception($"{enemy.Name}'s is not ready for play."); } if (enemy.Deck.Cards.All(c => c.Cost.Amount > 0)) { throw new Exception($"{enemy.Name}'s Deck does not contain a 0-Cost Card."); } } }
public override void Start() { Log.Info("Setting Up Random Encounter"); battleState.SetNextBattleground(possibleBattlegrounds.Random()); battleState.SetNextEncounter(encounterBuilder.Generate(encounterDifficulty)); SceneManager.LoadScene("BattleSceneV2"); }
void Start() { enemyArea = enemyArea.Initialized(encounterBuilder.Generate()); onEncounterGenerated.Publish(); }