/// <summary> /// Picks enemies until the quota is filled. Avoids overfilling the quota with more than 100. /// </summary> /// <param name="quota"></param> private void FillQuota(int quota) { towerBattle.enemyTypes = new List <EnemyEntry>(); towerBattle.numberOfEnemies = 0; EnemyEntry ee; int hp; while (quota > 0) { ee = (EnemyEntry)enemyLibrary.GetRandomEntry(); hp = ee.maxhp; if (hp < quota + 100) { towerBattle.enemyTypes.Add(ee); towerBattle.numberOfEnemies++; quota -= hp; } } }
/// <summary> /// Adds a random item to the bag. /// </summary> public void AddRandomEquip() { ItemEquip item = (ItemEquip)itemLibrary.GetRandomEntry(); AddItem(item, false); }
/// <summary> /// Adds a random module to the bag. /// </summary> public void AddRandomModule() { Module module = (Module)moduleLibrary.GetRandomEntry(); AddModule(module, false); }
/// <summary> /// Adds a random kanji to the bag. /// </summary> public void AddRandomKanji() { Kanji kanji = (Kanji)kanjiLibrary.GetRandomEntry(); AddKanji(kanji, false); }