Esempio n. 1
0
        public void SetToPosition(string type, int step)
        {
            if (Avatar.MonsterConfig.IsBuilding)
            {
                BattleManager.Instance.FlowWordQueue.Add(new FlowWord("抵抗", Position, 0, "Gold", 26, 0, 0, 1, 15), false);
                return;
            }

            Point dest = MonsterPositionHelper.GetAvailPoint(Position, type, IsLeft, step);

            if (dest.X != Position.X || dest.Y != Position.Y)
            {
                BattleLocationManager.SetToPosition(this, dest);
            }
        }
Esempio n. 2
0
        public void Summon(string type, int id, int count)
        {
            if (IsSummoned)
            {//召唤生物不能继续召唤,防止无限循环
                return;
            }

            List <Point> posLis = MonsterPositionHelper.GetAvailPointList(Position, type, IsLeft, count);

            foreach (var pos in posLis)
            {
                var mon = new Monster(id);
                mon.UpgradeToLevel(Level);
                LiveMonster newMon = new LiveMonster(Level, mon, pos, IsLeft);
                newMon.IsSummoned = true;
                BattleManager.Instance.MonsterQueue.AddDelay(newMon);
            }
        }