Exemplo n.º 1
0
        //public override void OnPrepareStartGame()
        //{
        //    base.OnPrepareStartGame();
        //}

        //public override void OnStartGame()
        //{
        //    base.OnStartGame();

        //}

        public override void OnStartGame()
        {
            base.OnStartGame();
            m_moive = Game.Createlayer(0, 0, "moive", "game.asset.living.BossBgAsset", "out", 1, 1);
            m_front = Game.Createlayer(1131, 150, "font", "game.asset.living.AntQueenAsset", "out", 1, 1);
            boss = Game.CreateBoss(bossID, 1316, 444, -1, 1);
            boss.SetRelateDemagemRect(-42, -200, 84, 194);
            boss.Say(LanguageMgr.GetTranslation("GameServerScript.AI.Messions.DCNM2102.msg1"), 0, 200, 0);

            m_moive.PlayMovie("in", 6000, 0);
            m_front.PlayMovie("in", 6100, 0);
            m_moive.PlayMovie("out", 10000, 1000);
            m_front.PlayMovie("out", 9900, 0);
        }
Exemplo n.º 2
0
        public override void OnPrepareNewGame()
        {
            base.OnPrepareNewGame();

            m_moive = Game.Createlayer(0, 0, "moive", "game.asset.living.BossBgAsset", "out", 1, 1, 0);
            m_front = Game.Createlayer(680, 330, "font", "game.asset.living.boguoLeaderAsset", "out", 1, 1, 0);
            m_boss = Game.CreateBoss(bossID, 770, -1500, -1, 1);

            m_boss.FallFrom(770, 301, "fall", 0, 2, 1000);
            m_boss.SetRelateDemagemRect(34, -35, 11, 18);
            m_boss.AddDelay(10);
            m_boss.Say(LanguageMgr.GetTranslation("GameServerScript.AI.Messions.CHM1073.msg2"), 0, 6000);
            m_boss.PlayMovie("call", 5900, 0);
            m_moive.PlayMovie("in", 9000, 0);
            m_boss.PlayMovie("weakness", 10000, 5000);
            m_front.PlayMovie("in", 9000, 0);
            m_moive.PlayMovie("out", 15000, 0);
        }
Exemplo n.º 3
0
        public override void OnStartGame()
        {
            base.OnStartGame();
            m_moive = Game.Createlayer(0, 0, "moive", "game.asset.living.BossBgAsset", "out", 1, 0);
            m_front = Game.Createlayer(680, 330, "font", "game.asset.living.boguoLeaderAsset", "out", 1, 0);
            m_boss = Game.CreateBoss(bossID, 770, -1500, -1, 1);

            m_boss.FallFrom(770, 301, "fall", 0, 2, 1000);
            m_boss.SetRelateDemagemRect(34, -35, 11, 18);
            m_boss.AddDelay(10);
            m_boss.Say("你们胆敢闯入我的地盘,准备受死吧!", 0, 6000);
            m_boss.PlayMovie("call", 5900, 0);
            m_moive.PlayMovie("in", 9000, 0);
            m_boss.PlayMovie("weakness", 10000, 5000);
            m_front.PlayMovie("in", 9000, 0);
            m_moive.PlayMovie("out", 15000, 0);

            //设置本关卡为Boss关卡,关卡胜利后,玩家可以翻一张牌
            Game.BossCardCount = 1;
        }
Exemplo n.º 4
0
 public override void OnPrepareNewGame()
 {
     base.OnPrepareNewGame();
     m_kingMoive = Game.Createlayer(0, 0, "kingmoive", "game.asset.living.BossBgAsset", "out", 1, 1, 0);
     m_front = Game.Createlayer(710, 380, "font", "game.asset.living.BombKingAsset", "out", 1, 1, 0);
     m_king = Game.CreateBoss(bossID, 888, 590, -1, 0);
     m_king.FallFrom(888, 690, "fall", 0, 2, 1000);
     m_king.SetRelateDemagemRect(-41, -187, 83, 140);
     m_kingMoive.PlayMovie("in", 1000, 0);
     m_front.PlayMovie("in", 2000, 2000);
     m_king.AddDelay(16);
 }
Exemplo n.º 5
0
        public override void OnPrepareNewGame()
        {
            base.OnPrepareNewGame();

            m_kingMoive = Game.Createlayer(0, 0, "kingmoive", "game.asset.living.BossBgAsset", "out", 1, 1, 0);
            m_kingFront = Game.Createlayer(720, 495, "font", "game.asset.living.boguoKingAsset", "out", 1, 1, 0);
            m_king = Game.CreateBoss(m_state, 888, 590, -1, 0);

            m_king.FallFrom(888, 690, "fall", 0, 2, 1000);
            m_king.SetRelateDemagemRect(-21, -87, 72, 59);
            m_king.AddDelay(10);

            m_king.Say(LanguageMgr.GetTranslation("GameServerScript.AI.Messions.CHM1176.msg2"), 0, 3000);
            m_kingMoive.PlayMovie("in", 9000, 0);
            m_kingFront.PlayMovie("in", 9000, 0);
            m_kingMoive.PlayMovie("out", 13000, 0);
            m_kingFront.PlayMovie("out", 13400, 0);
            turn = Game.TurnIndex;

            Game.BossCardCount = 1;
        }
Exemplo n.º 6
0
        public override void OnStartGame()
        {
            base.OnStartGame();
            m_kingMoive = Game.Createlayer(0, 0, "kingmoive", "game.asset.living.BossBgAsset", "out", 1, 0);
            m_kingFront = Game.Createlayer(610, 380, "font", "game.asset.living.boguoKingAsset", "out", 1, 0);
            m_king = Game.CreateBoss(m_state, 750, 668, -1, 0);

            m_king.FallFrom(750, 640, "fall", 0, 2, 1000);
            m_king.SetRelateDemagemRect(-21, -79, 72, 51);
            m_king.AddDelay(10);

            m_king.Say("你们这些低等的庶民,竟敢来到我的王国放肆!", 0, 3000);
            m_kingMoive.PlayMovie("in", 9000, 0);
            m_kingFront.PlayMovie("in", 9000, 0);
            m_kingMoive.PlayMovie("out", 13000, 0);
            m_kingFront.PlayMovie("out", 13400, 0);
            turn = Game.TurnIndex;
        }
Exemplo n.º 7
0
        public override bool CanGameOver()
        {
            base.CanGameOver();
            //回合数到100的时候结束游戏
            if (Game.TurnIndex > Game.MissionInfo.TotalTurn - 1)
            {
                return true;
            }

            if (m_king.IsLiving == false)
            {
                if (m_state == firstBossID)
                {
                    m_state++;
                }
            }

            if (m_state == secondBossID && m_secondKing == null)
            {
                m_kingMoive = Game.Createlayer(0, 0, "moive", "game.asset.living.BossBgAsset", "out", 1, 0);
                m_secondKing = Game.CreateBoss(m_state, m_king.X, m_king.Y, m_king.Direction, 1);
                Game.RemoveLiving(m_king.Id);

                if (m_secondKing.Direction == -1)
                {
                    m_secondKing.SetRectBomb(24, -159, 66, 38);
                    m_secondKing.SetRelateDemagemRect(58, -142, 5, 3);
                }
                else
                {
                    m_secondKing.SetRectBomb(-90, -159, 66, 38);
                    m_secondKing.SetRelateDemagemRect(-63, -142, 5, 3);
                }

                m_secondKing.Say("<span class='red'>你们把我激怒了,我饶不了你们!</span>", 0, 3000);
                m_kingMoive.PlayMovie("in", 5000, 0);
                m_secondKing.PlayMovie("weakness", 6100, 0);
                m_kingMoive.PlayMovie("out", 12000, 0);

                List<Player> players = Game.GetAllFightPlayers();
                int minDelay = Game.FindRandomPlayer().Delay;
                foreach (Player player in players)
                {
                    if (player.Delay < minDelay)
                    {
                        minDelay = player.Delay;
                    }
                }

                m_secondKing.AddDelay(minDelay - 2000);
                turn = Game.TurnIndex;
            }

            if (m_secondKing != null && m_secondKing.IsLiving == false)
            {
                m_leftWall = Game.FindPhysicalObjByName("wallLeft", false);
                m_rightWall = Game.FindPhysicalObjByName("wallRight", false);

                if (m_leftWall != null)
                {
                    Game.RemovePhysicalObj(m_leftWall[0], true);
                }

                if (m_rightWall != null)
                {
                    Game.RemovePhysicalObj(m_rightWall[0], true);
                }
                Game.CreatePhysicalObj(m_secondKing.X, m_secondKing.Y, "king", "game.living.LivingRecover005", "0", 0, 0);
                m_kill++;
                return true;
            }

            return false;
        }