public static List <Pile> TheFirstGame(bool two) { return(new List <Pile> { new Pile(Cellar.Get(), 10), new Pile(Moat.Get(), 10), new Pile(Village.Get(), 10), new Pile(Woodcutter.Get(), 10), new Pile(Workshop.Get(), 10), new Pile(Militia.Get(), 10), new Pile(Remodel.Get(), 10), new Pile(Smithy.Get(), 10), new Pile(Market.Get(), 10), new Pile(Mine.Get(), 10), }.Concat(VictoryAndTreasures(two)).ToList()); }
public List <Instruction> GetInstructions(CharacterSheet sheet) { List <Instruction> instructions = new List <Instruction>(); Instruction getBar = new Instruction(); getBar.destination = sheet.baseCity.Foundries[0].gameObject.GetComponent <NavigationWaypoint>(); getBar.building = sheet.baseCity.Foundries[0]; getBar.gather = new ItemType[] { ItemType.BAR }; getBar.give = new ItemType[] { }; getBar.fun1 = new instructionFunction((getBar.building).GetItem); instructions.Add(getBar); Instruction makeTool = new Instruction(); Smithy destination = null; foreach (Smithy smithy in sheet.baseCity.Smithies) { if (smithy.workers.Contains(sheet)) { destination = smithy; break; } } if (destination == null) { foreach (Smithy smithy in sheet.baseCity.Smithies) { if (smithy.CurrentPositions[Jobs.TOOLSMITH] > 0) { destination = smithy; smithy.workers.Add(sheet); smithy.CurrentPositions[Jobs.TOOLSMITH]--; break; } } } makeTool.destination = destination.gameObject.GetComponent <NavigationWaypoint>(); makeTool.building = destination; makeTool.gather = new ItemType[] { ItemType.TOOL }; makeTool.give = new ItemType[] { ItemType.BAR }; makeTool.recipe = MasterRecipe.Instance.Tool; makeTool.fun1 = new instructionFunction((makeTool.building).MakeRecipe); instructions.Add(makeTool); Instruction storeTool = new Instruction(); storeTool.destination = destination.gameObject.GetComponent <NavigationWaypoint>(); storeTool.building = destination; storeTool.gather = new ItemType[] { }; storeTool.give = new ItemType[] { ItemType.TOOL }; storeTool.fun1 = new instructionFunction((storeTool.building).StoreItem); storeTool.fun2 = new instructionFunction2((destination).ReleaseJob); instructions.Add(storeTool); return(instructions); }
// BASE static PresetGames() { games.Add(Games.AllCards1stEdition, new List <Card> { Adventurer.Get(), Bureaucrat.Get(), Cellar.Get(), CouncilRoom.Get(), Feast.Get(), Festival.Get(), Gardens.Get(), Chancellor.Get(), Chapel.Get(), Laboratory.Get(), Library.Get(), Market.Get(), Militia.Get(), Mine.Get(), Moat.Get(), Moneylender.Get(), Remodel.Get(), Smithy.Get(), Spy.Get(), Thief.Get(), ThroneRoom.Get(), Village.Get(), Witch.Get(), Woodcutter.Get(), Workshop.Get(), }); games.Add(Games.FirstGame, new List <Card> { Cellar.Get(), Moat.Get(), Village.Get(), Woodcutter.Get(), Workshop.Get(), Militia.Get(), Remodel.Get(), Smithy.Get(), Market.Get(), Mine.Get(), }); games.Add(Games.BigMoney, new List <Card> { Adventurer.Get(), Bureaucrat.Get(), Chancellor.Get(), Chapel.Get(), Feast.Get(), Laboratory.Get(), Market.Get(), Mine.Get(), Moneylender.Get(), ThroneRoom.Get(), }); games.Add(Games.Interaction, new List <Card> { Bureaucrat.Get(), Chancellor.Get(), CouncilRoom.Get(), Festival.Get(), Library.Get(), Militia.Get(), Moat.Get(), Spy.Get(), Thief.Get(), Village.Get() }); games.Add(Games.SizeDistortion, new List <Card> { Cellar.Get(), Chapel.Get(), Feast.Get(), Gardens.Get(), Laboratory.Get(), Thief.Get(), Village.Get(), Witch.Get(), Woodcutter.Get(), Workshop.Get(), }); games.Add(Games.VillageSquare, new List <Card> { Bureaucrat.Get(), Cellar.Get(), Festival.Get(), Library.Get(), Market.Get(), Remodel.Get(), Smithy.Get(), ThroneRoom.Get(), Village.Get(), Woodcutter.Get(), }); games.Add(Games.ThrashHeap, new List <Card> { Chapel.Get(), Village.Get(), Workshop.Get(), Woodcutter.Get(), Feast.Get(), Moneylender.Get(), Remodel.Get(), Mine.Get(), Festival.Get(), Market.Get(), }); }
/// <summary> /// Creates a new card based on how many cards have already been made. /// </summary> /// <param name="card"> /// The name of the card to be created. /// </param> /// <returns> /// The new created card. /// </returns> public static Card CreateCard(CardName card) { Contract.Requires(card != CardName.Backside & card != CardName.Empty); Contract.Ensures(Contract.Result<Card>().Name == card); Card c; switch (card) { case CardName.Copper: c = new Copper(); break; case CardName.Silver: c = new Silver(); break; case CardName.Gold: c = new Gold(); break; case CardName.Curse: c = new Curse(); break; case CardName.Estate: c = new Estate(); break; case CardName.Duchy: c = new Duchy(); break; case CardName.Province: c = new Province(); break; case CardName.Gardens: c = new Gardens(); break; case CardName.Cellar: c = new Cellar(); break; case CardName.Chapel: c = new Chapel(); break; case CardName.Chancellor: c = new Chancellor(); break; case CardName.Village: c = new Village(); break; case CardName.Woodcutter: c = new Woodcutter(); break; case CardName.Workshop: c = new Workshop(); break; case CardName.Feast: c = new Feast(); break; case CardName.Moneylender: c = new Moneylender(); break; case CardName.Remodel: c = new Remodel(); break; case CardName.Smithy: c = new Smithy(); break; case CardName.ThroneRoom: c = new ThroneRoom(); break; case CardName.CouncilRoom: c = new CouncilRoom(); break; case CardName.Festival: c = new Festival(); break; case CardName.Laboratory: c = new Laboratory(); break; case CardName.Library: c = new Library(); break; case CardName.Market: c = new Market(); break; case CardName.Mine: c = new Mine(); break; case CardName.Adventurer: c = new Adventurer(); break; case CardName.Bureaucrat: c = new Bureaucrat(); break; case CardName.Militia: c = new Militia(); break; case CardName.Spy: c = new Spy(); break; case CardName.Thief: c = new Thief(); break; case CardName.Witch: c = new Witch(); break; case CardName.Moat: c = new Moat(); break; default: throw new NotImplementedException("Tried to create a card that was not implemented when CardFactory was last updated."); } c.Initialize(card, CardsMade[card]); CardsMade[card] += 1; createdCards.Add(c, true); return c; }
public void CheckChanges() { var context = BulkOrderSystem.GetContext(Player, false); if (context != null) { foreach (var kvp in context.Entries) { switch (kvp.Key) { case BODType.Smith: if (Smithy == null) { Smithy = new BODData(kvp.Key, kvp.Value); } else { Smithy.CheckChanges(kvp.Value); } break; case BODType.Tailor: if (Tailor == null) { Tailor = new BODData(kvp.Key, kvp.Value); } else { Tailor.CheckChanges(kvp.Value); } break; case BODType.Alchemy: if (Alchemy == null) { Alchemy = new BODData(kvp.Key, kvp.Value); } else { Alchemy.CheckChanges(kvp.Value); } break; case BODType.Inscription: if (Inscription == null) { Inscription = new BODData(kvp.Key, kvp.Value); } else { Inscription.CheckChanges(kvp.Value); } break; case BODType.Tinkering: if (Tinkering == null) { Tinkering = new BODData(kvp.Key, kvp.Value); } else { Tinkering.CheckChanges(kvp.Value); } break; case BODType.Cooking: if (Cooking == null) { Cooking = new BODData(kvp.Key, kvp.Value); } else { Cooking.CheckChanges(kvp.Value); } break; case BODType.Fletching: if (Fletching == null) { Fletching = new BODData(kvp.Key, kvp.Value); } else { Fletching.CheckChanges(kvp.Value); } break; case BODType.Carpentry: if (Carpentry == null) { Carpentry = new BODData(kvp.Key, kvp.Value); } else { Carpentry.CheckChanges(kvp.Value); } break; } } } }