/// <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;
            }
        }
    }
예제 #2
0
    /// <summary>
    /// Adds a random item to the bag.
    /// </summary>
    public void AddRandomEquip()
    {
        ItemEquip item = (ItemEquip)itemLibrary.GetRandomEntry();

        AddItem(item, false);
    }
예제 #3
0
    /// <summary>
    /// Adds a random module to the bag.
    /// </summary>
    public void AddRandomModule()
    {
        Module module = (Module)moduleLibrary.GetRandomEntry();

        AddModule(module, false);
    }
예제 #4
0
    /// <summary>
    /// Adds a random kanji to the bag.
    /// </summary>
    public void AddRandomKanji()
    {
        Kanji kanji = (Kanji)kanjiLibrary.GetRandomEntry();

        AddKanji(kanji, false);
    }