public void LoadPrototypes() { Apocalypses = Load <List <Apocalypse> >("Apocalypses.xml"); Decks = Load <List <Deck> >("Decks.xml"); Improvements = Load <List <WorldImprovement> >("Improvements.xml"); PlayerTemplate = Load <PlayerProfile>("PlayerTemplate.xml"); var allCards = Decks.SelectMany(d => d.Cards).ToList(); Localizer.Instance.EnsureAllLocalKeyExist(allCards); }
public PartyAdventureState Initialized(BaseHero one, BaseHero two, BaseHero three) { heroes = party.Initialized(one, two, three).Heroes.Select(h => new Hero(h, CreateDeck(h.Deck))).ToArray(); credits = heroes.Sum(h => h.Character.StartingCredits); numShopRestocks = 2; var allStartingCards = Decks.SelectMany(d => d.Cards).ToList(); cards.Initialized(allStartingCards); allStartingCards.Distinct().ForEach(c => cards.EnsureHasAtLeast(c, 4)); equipment = new PartyEquipmentCollection(); return(this); }
public Shoe() { Decks = Enumerable.Range(1, Table.SHOE_SIZE).Select(i => new Deck()).ToList(); Cards = Decks.SelectMany(d => d.Cards).ToList(); }