コード例 #1
0
    public void Finalize(IEnumerable <Deity> deities)
    {
        AcceptsPrayers     = Globals.Random.NextDouble() < 0.66f;
        DonationMultiplier = Globals.Random.NextDouble() < 0.66 ? 1 : -1;
        SacrificeCost      = Globals.Random.NextDouble() < 0.2f ? 5 : -1;

        Archetype.Finalize(this, deities);
        foreach (var domain in Domains)
        {
            domain.Finalize(this, deities);
        }

        Likes    = Likes.Distinct().ToList();
        Dislikes = Dislikes.Distinct().ToList();

        var common = Likes.Where(Dislikes.Contains).ToArray();

        foreach (var thing in common)
        {
            Likes.Remove(thing);
            Dislikes.Remove(thing);
        }
    }