Пример #1
0
        public GameRules()
        {
            /*HeroesPerPlayer = 3;
             * PlayersNumber = 2;
             * GameMap = MapLoader.FromText(Graphics.resources.Res.SimpleMap);
             * StartMoney = 200;
             * LevelUpMoney = 200;*/

            HeroesPerPlayer = 4;
            PlayersNumber   = 2;
            GameMap         = MapLoader.FromText(Graphics.resources.Res.BigMap);
            StartMoney      = 200;
            LevelUpMoney    = 200;

            /*HeroesPerPlayer = 3;
             * PlayersNumber = 2;
             * GameMap = new Map(5, 6);
             * StartMoney = 200000;
             * LevelUpMoney = 200;
             */

            GameShop       = new BasicShop();
            AllowedHeroes  = HeroMaker.GetAllHeroes();
            DraftSequence  = GenerateDraft(DraftType.PickBanPick, PlayersNumber, HeroesPerPlayer, 1);
            TurnFunction   = GenerateStandartTurn;
            GetSpawnPoints = (pl) =>
            {
                Point p;
                switch (pl)
                {
                case 0:
                    p = new Point(1, 1);
                    break;

                case 1:
                    p = new Point(GameMap.Length - 2, GameMap.Width - 2);
                    break;

                case 2:
                    p = new Point(1, GameMap.Width - 2);
                    break;

                case 3:
                    p = new Point(GameMap.Length - 2, 1);
                    break;

                default:
                    throw new ArgumentException();
                }
                return(new List <Point>()
                {
                    p,
                    p + new Point(1, 1),
                    p + new Point(-1, -1),
                    p + new Point(1, -1),
                    p + new Point(-1, 1),
                });
            };
        }
Пример #2
0
 public GameObject heroify(GameObject gameObject)
 {
     AnimateObject.Animate(gameObject);
     gameObject.pRender.DisplayName = gameObject.pRender.DisplayName.Replace("animated ", "");
     gameObject.pBrain.FactionMembership.Add("Fish", 100);
     gameObject.pBrain.FactionMembership["Newly Sentient Beings"] = 10;
     gameObject = HeroMaker.MakeHero(gameObject);
     return(gameObject);
 }
Пример #3
0
 public acegiak_RomanceChatNode NameCheck(acegiak_RomanceChatNode node)
 {
     if (!ParentObject.HasProperName &&
         namegenerated == null &&
         ParentObject.pBrain.GetFeeling(XRLCore.Core.Game.Player.Body) > 7)
     {
         namegenerated = HeroMaker.MakeHeroName(ParentObject, new string[0], new string[0], bIncludeTitle: false);
         ParentObject.SetIntProperty("ProperNoun", 1);
         ParentObject.SetIntProperty("Renamed", 1);
         node.Text = "[" + ParentObject.The + ParentObject.pRender.DisplayName + " tells you " + ParentObject.its + " name: " + namegenerated + "]\n\n" + node.Text;
         ParentObject.pRender.DisplayName = namegenerated + ", " + ParentObject.pRender.DisplayName;
         JournalAPI.AddAccomplishment("&y" + ParentObject.pRender.DisplayName + " shared " + ParentObject.its + " name with you.", "general", null);
     }
     return(node);
 }
Пример #4
0
        private void AddHeroToView(Hero hero)
        {
            var pl = Game.Players[Game.PickSeq[Game.PickStep].Item1];

            pl.Heroes.Add(HeroMaker.CreateHero(hero.Name));
            PlayersPickedHeroesPanel[pl].Controls.Add(new Button // вместо кнопки надо чтото ещё
            {
                Dock      = DockStyle.Left,
                Size      = iconSize,
                Margin    = iconBorders,
                Image     = hero.GetImage(),
                Text      = hero.Name,
                BackColor = Color.White,
                TextAlign = ContentAlignment.TopCenter,
            });
        }