// Initializes the Battle to begin public bool StartBattle(bool isAutoBattle) { if (!isAutoBattle) { BattleEngineClearData(); BattleScore.AutoBattle = false; } else { BattleScore = new Score(); BattleScore.AutoBattle = true; BattleMessages = new BattleMessages(); ItemPool.Clear(); MonsterList.Clear(); //do not clear char list bc this has already been populated } isBattleRunning = true; // Characters not Initialized, so false start... if (CharacterList.Count < 1) { return(false); } return(true); }
/// <summary> /// Clear the List between Rounds /// </summary> /// <returns></returns> private bool ClearLists() { GameBoardModel.Wipe(); ItemPool.Clear(); MonsterList.Clear(); return(true); }
// Sets the new state for the variables for Battle private void BattleEngineClearData() { //BattleScore = new Score(); // BattleMessages = new BattleMessages(); ItemPool.Clear(); MonsterList.Clear(); CharacterList.Clear(); // Reset current player PlayerCurrent = null; }
// Sets the new state for the variables for Battle public void BattleEngineClearData() { BattleScore = new Score(); BattleMessages = new BattleMessages(); RoundStateEnum = RoundEnum.NewRound; ItemPool.Clear(); MonsterList.Clear(); CharacterList.Clear(); // Reset current player PlayerCurrent = null; }
/// <summary> /// Clear the List between Rounds /// will only clear potions and monster /// </summary> /// <returns></returns> private bool ClearLists() { MonsterList.Clear(); potionPool.Clear(); if (MonsterList.Count == 0 && potionPool.Count == 0) { return(true); } else { return(false); } }
// Sets the new state for the variables for Battle public void BattleEngineClearData() { // Create a score object BattleScore = new Score(); // Create a BattleMessages object BattleMessage = new BattleMessages(); // Clear the lists ItemPool.Clear(); MonsterList.Clear(); CharacterList.Clear(); // Reset current player PlayerCurrent = null; }
/// <summary> /// Add Monsters to the Round /// /// Because Monsters can be duplicated, will add 1, 2, 3 to their name /// /* * Hint: * I don't have crudi monsters yet so will add 6 new ones... * If you have crudi monsters, then pick from the list * * Consdier how you will scale the monsters up to be appropriate for the characters to fight * */ /// </summary> /// <returns></returns> public int AddMonstersToRound() { // TODO: Teams, You need to implement your own Logic can not use mine. int TargetLevel = 1; if (CharacterList.Count() > 0) { // Get the Min Character Level (linq is soo cool....) TargetLevel = Convert.ToInt32(CharacterList.Min(m => m.Level)); } for (var i = 0; i < MaxNumberPartyMonsters; i++) { var data = Helpers.RandomPlayerHelper.GetRandomMonster(TargetLevel); // Help identify which Monster it is data.Name += " " + MonsterList.Count() + 1; //Scenario 31 if (BattleScore.RoundCount >= 100) { data.Attack *= 10; data.Speed *= 10; data.Defense *= 10; data.CurrHealth *= 10; data.MaxHealth *= 10; } MonsterList.Add(new PlayerInfoModel(data)); } if ((BossBattleFunctionality && DiceHelper.RollDice(1, 100) > 90) || testBossHack) { Debug.WriteLine("BOSS MONSTER APPROACHING!!!!!"); MonsterList.Clear(); int scaleFactor = 0; for (int i = 0; i < CharacterList.Count; i++) { scaleFactor += CharacterList[i].Level; } if (scaleFactor > 20) { scaleFactor = 20; } var data = new BaseMonster(); data.LevelUpToValue(scaleFactor); data.Attack = 5000; data.Defense = 5000; data.Speed = 10000; data.MaxHealth = data.CurrHealth = 1000; MonsterList.Add(new PlayerInfoModel(data)); } return(MonsterList.Count()); }
/// <summary> /// Clear the monster and item lists between Rounds /// </summary> /// <returns></returns> private bool ClearLists() { ItemPool.Clear(); MonsterList.Clear(); return(true); }
//do not clear char list private void ClearLists() { ItemPool = new List <Item>(); MonsterList.Clear(); MonsterList = new ObservableCollection <Monster>(); }
// don't clear characters here because eventually they all get defeated by monsters private void ClearLists() { ItemPool = new List <Item>(); MonsterList.Clear(); MonsterList = new List <Monster>(); }