Пример #1
0
        public void PreMergeOperations()
        {
            List <ArgHandler> ArgumentsToRemove = new List <ArgHandler>();

            foreach (ArgHandler arg in ListOfArguments)
            {
                if (arg.ArgumentName.Contains("ReformVillageToCastle"))
                {
                    string nodeToUpgrade = arg.Argument;
                    foreach (Node node in Map.nodeList)
                    {
                        if (string.Equals(nodeToUpgrade, node.Name))
                        {
                            node.NodeType = enmNodeType.Castle;
                            ArgumentsToRemove.Add(arg);
                            break;
                        }
                    }
                }
            }

            foreach (ArgHandler arg in ArgumentsToRemove)
            {
                ListOfArguments.Remove(arg);
            }
        }
Пример #2
0
 public void PreMergeOperations()
 {
     foreach (Player player in Players)
     {
         ArgHandler argument = new ArgHandler("CallCrusade" + player.color + "Blocked2", "Crusade now Unavailable");
         ListOfArguments.Add(argument);
     }
 }
Пример #3
0
 public void Run()
 {
     if (!disabled)
     {
         ActivePlayer.Gold        -= 300;
         ActivePlayer.Stone       -= 150;
         SelectedNode.NodeType     = enmNodeType.Castle;
         SelectedNode.DefenseLevel = 1;
         ArgHandler arg1 = new ArgHandler("ReformVillageToCastle" + ActivePlayer.color.ToString() + SelectedNode.Name,
                                          SelectedNode.Name);
         ListOfArguments.Add(arg1);
     }
 }
Пример #4
0
        public void Run()
        {
            Random rnd = new Random();

            foreach (Node node in Map.nodeList)
            {
                if (node.NodeType == enmNodeType.Church)
                {
                    string    ID           = ActivePlayer.color.ToString() + "Commander" + ActivePlayer.AgentCounter.ToString();
                    Commander newCommander = new Commander(ID, Constants.commanderGoldUpkeep, Constants.commanderFoodUpkeep, node.Name, ActivePlayer.color);
                    newCommander.army.LightInfantry = rnd.Next(5, 15);
                    newCommander.army.HeavyInfantry = rnd.Next(1, 10);
                    newCommander.army.LightCavalry  = rnd.Next(1, 10);
                    newCommander.army.HeavyCavalry  = rnd.Next(0, 5);
                    newCommander.army.Archers       = rnd.Next(5, 25);
                    newCommander.army.Musketeers    = rnd.Next(0, 5);
                    ActivePlayer.addCommander(newCommander);
                }
            }
            ArgHandler argument = new ArgHandler("CallCrusade" + ActivePlayer.color + "Blocked1", "Crusade Already Called");

            ListOfArguments.Add(argument);
        }