示例#1
0
文件: GreatWall.cs 项目: ybug/CivOne
 public GreatWall() : base(30)
 {
     Name         = "Great Wall";
     RequiredTech = new Masonry();
     ObsoleteTech = new Gunpowder();
     SetSmallIcon(5, 2);
     Type = Wonder.GreatWall;
 }
示例#2
0
文件: CityWalls.cs 项目: ybug/CivOne
 public CityWalls() : base(12, 2)
 {
     Name         = "City Walls";
     RequiredTech = new Masonry();
     SetIcon(1, 2, false);
     SetSmallIcon(1, 2);
     Type = Building.CityWalls;
 }
示例#3
0
 public Pyramids() : base(30)
 {
     Name         = "Pyramids";
     RequiredTech = new Masonry();
     ObsoleteTech = new Communism();
     SetSmallIcon(4, 1);
     Type = Wonder.Pyramids;
 }
示例#4
0
文件: Palace.cs 项目: ybug/CivOne
        public Palace() : base(20, 5)
        {
            Name         = "Palace";
            RequiredTech = new Masonry();
            SetSmallIcon(0, 0);
            Type = Building.Palace;

            // Civilopedia says the Maintenance cost is 5, but it is actually 0
            SetFree();
        }
示例#5
0
        public void Card_MasonryAction1_Meld1()
        {
            //testGame.Players[0].AlwaysParticipates = true;
            //testGame.Players[0].SelectsCards = new List<int>() { 0 };

            bool result = new Masonry().Actions.ToList()[0].ActionHandler(new CardActionParameters {
                TargetPlayer = testGame.Players[0], Game = testGame, ActivePlayer = testGame.Players[0], PlayerSymbolCounts = new Dictionary <IPlayer, Dictionary <Symbol, int> >()
            });

            Assert.AreEqual(true, result);

            Assert.AreEqual(3, testGame.Players[0].Hand.Count);
            Assert.AreEqual(1, testGame.Players[0].Tableau.Stacks[Color.Blue].Cards.Count);
            Assert.AreEqual(0, testGame.Players[0].Tableau.Stacks[Color.Green].Cards.Count);
            Assert.AreEqual(1, testGame.Players[0].Tableau.Stacks[Color.Yellow].Cards.Count);
            Assert.AreEqual(2, testGame.Players[0].Tableau.Stacks[Color.Red].Cards.Count);
        }
示例#6
0
    public List <Instruction> GetInstructions(CharacterSheet sheet)
    {
        List <Instruction> instructions = new List <Instruction>();

        Instruction getStone = new Instruction();

        getStone.destination = sheet.baseCity.OreShops[0].gameObject.GetComponent <NavigationWaypoint>();
        getStone.building    = sheet.baseCity.OreShops[0];
        getStone.gather      = new ItemType[] { ItemType.STONE };
        getStone.give        = new ItemType[] { };
        getStone.fun1        = new instructionFunction((getStone.building).GetItem);

        instructions.Add(getStone);

        Instruction makeStoneBlock = new Instruction();
        Masonry     destination    = null;

        foreach (Masonry mason in sheet.baseCity.Masonries)
        {
            if (mason.workers.Contains(sheet))
            {
                destination = mason;
                break;
            }
        }

        if (destination == null)
        {
            foreach (Masonry mason in sheet.baseCity.Masonries)
            {
                if (mason.CurrentPositions[Jobs.STONECUTTER] > 0)
                {
                    destination = mason;
                    mason.workers.Add(sheet);
                    mason.CurrentPositions[Jobs.STONECUTTER]--;
                    break;
                }
            }
        }
        makeStoneBlock.destination = destination.gameObject.GetComponent <NavigationWaypoint>();
        makeStoneBlock.building    = destination;
        makeStoneBlock.gather      = new ItemType[] { ItemType.STONEBLOCK };
        makeStoneBlock.give        = new ItemType[] { ItemType.STONE };
        makeStoneBlock.recipe      = MasterRecipe.Instance.StoneBlock;
        makeStoneBlock.fun1        = new instructionFunction((makeStoneBlock.building).MakeRecipe);

        instructions.Add(makeStoneBlock);

        Instruction storeStoneBlock = new Instruction();

        storeStoneBlock.destination = destination.gameObject.GetComponent <NavigationWaypoint>();
        storeStoneBlock.building    = destination;
        storeStoneBlock.gather      = new ItemType[] { };
        storeStoneBlock.give        = new ItemType[] { ItemType.STONEBLOCK };
        storeStoneBlock.fun1        = new instructionFunction((storeStoneBlock.building).StoreItem);
        storeStoneBlock.fun2        = new instructionFunction2((destination).ReleaseJob);

        instructions.Add(storeStoneBlock);

        return(instructions);
    }