示例#1
0
    public override double GetMinCost()
    {
        // We are assuming that on average a token is 1 mana of value
        // This is a bit flawed because the token type is randomly chosen with a probability model
        // so the cost of the token is not determined by the budget
        SummonEffectDescription desc = new SummonEffectDescription();

        desc.amount   = 1;
        desc.manaCost = 1;
        return(desc.PowerLevel());
    }
示例#2
0
    public override IEffectDescription Generate()
    {
        SummonEffectDescription desc = new SummonEffectDescription();

        desc.tokenType = ProceduralUtils.GetRandomValue <CreatureType>(random, model);
        desc.manaCost  = creatureModelIndex.GetToken(desc.tokenType).manaCost;

        // Find the bounds of card amounts
        int max = ProceduralUtils.GetUpperBound(desc, ref desc.amount, MIN_SUMMONS, MAX_SUMMONS, maxAllocatedBudget);
        int min = ProceduralUtils.GetLowerBound(desc, ref desc.amount, MIN_SUMMONS, max, minAllocatedBudget);

        Assert.IsTrue(max >= min);
        desc.amount = random.Next(min, max);

        return(desc);
    }