Пример #1
0
        //public override void OnPrepareStartGame()
        //{
        //    base.OnPrepareStartGame();
        //    Game.TotalTurn = Game.PlayerCount * 3;
        //    Game.SendMissionInfo();

        //}


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

            #region 生成箱子
            List <ItemInfo> items = new List <ItemInfo>();
            for (int boxCount = 0; boxCount < 54; boxCount++)
            {
                List <ItemInfo> infos = null;
                if (boxCount > 9)
                {
                    DropInventory.SpecialDrop(Game.MissionInfo.Id, 1, ref infos);  //黄箱(9~80)
                }
                else
                {
                    DropInventory.SpecialDrop(Game.MissionInfo.Id, 2, ref infos);  //红箱(0~8)
                }
                if (infos != null)
                {
                    foreach (ItemInfo info in infos)
                    {
                        items.Add(info);
                    }
                }
                else
                {
                    items.Add(null);
                }
            }
            #endregion

            //"1"黄色箱子、"2"红色箱子
            Game.CreateBox(455, 88, "2", items[0]);
            Game.CreateBox(555, 88, "2", items[1]);
            Game.CreateBox(655, 88, "2", items[2]);
            Game.CreateBox(755, 88, "2", items[3]);
            Game.CreateBox(855, 88, "2", items[4]);
            Game.CreateBox(955, 88, "2", items[5]);
            Game.CreateBox(1055, 88, "2", items[6]);
            Game.CreateBox(1155, 88, "2", items[7]);
            Game.CreateBox(1255, 88, "2", items[8]);

            Game.CreateBox(450, 184, "1", items[9]);
            Game.CreateBox(450, 259, "1", items[10]);
            Game.CreateBox(450, 335, "1", items[11]);
            Game.CreateBox(450, 420, "1", items[12]);
            Game.CreateBox(450, 504, "1", items[13]);


            Game.CreateBox(550, 184, "1", items[14]);
            Game.CreateBox(550, 259, "1", items[15]);
            Game.CreateBox(550, 335, "1", items[16]);
            Game.CreateBox(550, 420, "1", items[17]);
            Game.CreateBox(550, 504, "1", items[18]);


            Game.CreateBox(650, 184, "1", items[19]);
            Game.CreateBox(650, 259, "1", items[20]);
            Game.CreateBox(650, 335, "1", items[21]);
            Game.CreateBox(650, 420, "1", items[22]);
            Game.CreateBox(650, 504, "1", items[23]);


            Game.CreateBox(750, 184, "1", items[24]);
            Game.CreateBox(750, 259, "1", items[25]);
            Game.CreateBox(750, 335, "1", items[26]);
            Game.CreateBox(750, 420, "1", items[27]);
            Game.CreateBox(750, 504, "1", items[28]);


            Game.CreateBox(850, 184, "1", items[29]);
            Game.CreateBox(850, 259, "1", items[30]);
            Game.CreateBox(850, 335, "1", items[31]);
            Game.CreateBox(850, 420, "1", items[32]);
            Game.CreateBox(850, 504, "1", items[33]);


            Game.CreateBox(950, 184, "1", items[34]);
            Game.CreateBox(950, 259, "1", items[35]);
            Game.CreateBox(950, 335, "1", items[36]);
            Game.CreateBox(950, 420, "1", items[37]);
            Game.CreateBox(950, 504, "1", items[38]);

            Game.CreateBox(1050, 184, "1", items[39]);
            Game.CreateBox(1050, 259, "1", items[40]);
            Game.CreateBox(1050, 335, "1", items[41]);
            Game.CreateBox(1050, 420, "1", items[42]);
            Game.CreateBox(1050, 504, "1", items[43]);


            Game.CreateBox(1150, 184, "1", items[44]);
            Game.CreateBox(1150, 259, "1", items[45]);
            Game.CreateBox(1150, 335, "1", items[46]);
            Game.CreateBox(1150, 420, "1", items[47]);
            Game.CreateBox(1150, 504, "1", items[48]);


            Game.CreateBox(1250, 189, "1", items[49]);
            Game.CreateBox(1250, 259, "1", items[50]);
            Game.CreateBox(1250, 335, "1", items[51]);
            Game.CreateBox(1250, 420, "1", items[52]);
            Game.CreateBox(1250, 504, "1", items[53]);


            Game.BossCardCount = 1;
        }
Пример #2
0
        public override void OnPrepareNewGame()
        {
            base.OnPrepareNewGame();


            #region 生成箱子
            List <ItemInfo> items = new List <ItemInfo>();
            for (int boxCount = 0; boxCount <= 80; boxCount++)
            {
                List <ItemInfo> infos = null;
                if (boxCount > 8)
                {
                    DropInventory.SpecialDrop(Game.MissionInfo.Id, 1, ref infos);  //黄箱(9~80)
                }
                else
                {
                    DropInventory.SpecialDrop(Game.MissionInfo.Id, 2, ref infos);  //红箱(0~8)
                }
                if (infos != null)
                {
                    foreach (ItemInfo info in infos)
                    {
                        items.Add(info);
                    }
                }
                else
                {
                    items.Add(null);
                }
            }
            #endregion

            //"1"黄色箱子、"2"红色箱子
            Game.CreateBox(450, 184, "2", items[0]);
            Game.CreateBox(550, 549, "2", items[1]);
            Game.CreateBox(650, 184, "2", items[2]);
            Game.CreateBox(750, 549, "2", items[3]);
            Game.CreateBox(850, 184, "2", items[4]);
            Game.CreateBox(950, 549, "2", items[5]);
            Game.CreateBox(1050, 184, "2", items[6]);
            Game.CreateBox(1150, 549, "2", items[7]);
            Game.CreateBox(1250, 184, "2", items[8]);

            Game.CreateBox(450, 234, "1", items[10]);
            Game.CreateBox(450, 285, "1", items[11]);
            Game.CreateBox(450, 335, "1", items[12]);
            Game.CreateBox(450, 394, "1", items[13]);
            Game.CreateBox(450, 444, "1", items[14]);
            Game.CreateBox(450, 499, "1", items[15]);
            Game.CreateBox(450, 549, "1", items[16]);

            Game.CreateBox(550, 184, "1", items[17]);
            Game.CreateBox(550, 234, "1", items[18]);
            Game.CreateBox(550, 285, "1", items[19]);
            Game.CreateBox(550, 335, "1", items[20]);
            Game.CreateBox(550, 394, "1", items[21]);
            Game.CreateBox(550, 444, "1", items[22]);
            Game.CreateBox(550, 499, "1", items[23]);

            Game.CreateBox(650, 234, "1", items[26]);
            Game.CreateBox(650, 285, "1", items[27]);
            Game.CreateBox(650, 335, "1", items[28]);
            Game.CreateBox(650, 394, "1", items[29]);
            Game.CreateBox(650, 444, "1", items[30]);
            Game.CreateBox(650, 499, "1", items[31]);
            Game.CreateBox(650, 549, "1", items[32]);

            Game.CreateBox(750, 184, "1", items[33]);
            Game.CreateBox(750, 234, "1", items[34]);
            Game.CreateBox(750, 285, "1", items[35]);
            Game.CreateBox(750, 335, "1", items[36]);
            Game.CreateBox(750, 394, "1", items[37]);
            Game.CreateBox(750, 444, "1", items[38]);
            Game.CreateBox(750, 499, "1", items[39]);

            Game.CreateBox(850, 234, "1", items[42]);
            Game.CreateBox(850, 285, "1", items[43]);
            Game.CreateBox(850, 335, "1", items[44]);
            Game.CreateBox(850, 394, "1", items[45]);
            Game.CreateBox(850, 444, "1", items[46]);
            Game.CreateBox(850, 499, "1", items[47]);
            Game.CreateBox(850, 549, "1", items[48]);

            Game.CreateBox(950, 184, "1", items[49]);
            Game.CreateBox(950, 234, "1", items[50]);
            Game.CreateBox(950, 285, "1", items[51]);
            Game.CreateBox(950, 335, "1", items[52]);
            Game.CreateBox(950, 394, "1", items[53]);
            Game.CreateBox(950, 444, "1", items[54]);
            Game.CreateBox(950, 499, "1", items[55]);

            Game.CreateBox(1050, 234, "1", items[58]);
            Game.CreateBox(1050, 285, "1", items[59]);
            Game.CreateBox(1050, 335, "1", items[60]);
            Game.CreateBox(1050, 394, "1", items[61]);
            Game.CreateBox(1050, 444, "1", items[62]);
            Game.CreateBox(1050, 499, "1", items[63]);
            Game.CreateBox(1050, 549, "1", items[64]);

            Game.CreateBox(1150, 184, "1", items[65]);
            Game.CreateBox(1150, 234, "1", items[66]);
            Game.CreateBox(1150, 285, "1", items[67]);
            Game.CreateBox(1150, 335, "1", items[68]);
            Game.CreateBox(1150, 394, "1", items[69]);
            Game.CreateBox(1150, 444, "1", items[70]);
            Game.CreateBox(1150, 499, "1", items[71]);

            Game.CreateBox(1250, 234, "1", items[74]);
            Game.CreateBox(1250, 285, "1", items[75]);
            Game.CreateBox(1250, 335, "1", items[76]);
            Game.CreateBox(1250, 394, "1", items[77]);
            Game.CreateBox(1250, 444, "1", items[78]);
            Game.CreateBox(1250, 499, "1", items[79]);
            Game.CreateBox(1250, 549, "1", items[80]);
        }
Пример #3
0
        public bool Shoot(int x, int y, int force, int angle)
        {
            if (m_shootCount > 0)
            {
                EffectTrigger = false;
                OnPlayerShoot();
                if (EffectTrigger)
                {
                    Game.SendMessage(PlayerDetail, LanguageMgr.GetTranslation("PlayerEquipEffect.Success"), LanguageMgr.GetTranslation("PlayerEquipEffect.Success1", PlayerDetail.PlayerCharacter.NickName), 3);
                }

                //trminhpc +2=110; +50=85; +40=80; +30=70; +20=55; +10=50
                int max_energy     = m_player.PlayerCharacter.Agility / 30 + 240;
                int energy_use     = (max_energy - Energy);
                int currentBall_id = m_currentBall.ID;
                if (m_ballCount == 1 && !IsSpecialSkill &&
                    (energy_use == 220 || energy_use == 270 || energy_use == 275 || energy_use == 290 || energy_use == 300 || energy_use == 305) &&
                    (ShootCount > 3 || (m_shootCountUp > 2 && ShootCount == 3) ||
                     (m_shootCountUp > 3 && ShootCount == 2) ||
                     (m_shootCountUp > 4 && ShootCount == 1)))
                {
                    currentBall_id = m_MultiBallId;
                }
                else if (m_ballCount == 1 && !IsSpecialSkill && ShootCount == 1 && m_shootCountUp == 1 &&
                         (energy_use == 170 || energy_use == 220 || energy_use == 225 || energy_use == 240 || energy_use == 250 || energy_use == 255 || energy_use == 305))
                {
                    currentBall_id = m_AddWoundBallId;
                }
                //End Special Effect ^^

                if (ShootImp(currentBall_id, x, y, force, angle, m_ballCount, ShootCount))
                {
                    m_shootCount--;
                    m_shootCountUp++;
                    if (m_shootCount <= 0 || IsLiving == false)
                    {
                        StopAttacking();
                        m_shootCountUp = 1;
                        AddDelay(m_currentBall.Delay + m_weapon.Property8);
                        AddDander(20);
                        if (CanGetProp)
                        {
                            int             gold      = 0;
                            int             money     = 0;
                            int             giftToken = 0;
                            int             medal     = 0;
                            List <ItemInfo> infos     = null;
                            if (DropInventory.FireDrop(m_game.RoomType, ref infos))
                            {
                                if (infos != null)
                                {
                                    foreach (ItemInfo info in infos)
                                    {
                                        ItemInfo.FindSpecialItemInfo(info, ref gold, ref money, ref giftToken, ref medal);
                                        if (info != null)
                                        {
                                            //medal = info.TemplateID;
                                            PlayerDetail.AddTemplate(info, eBageType.FightBag, info.Count);
                                        }
                                    }
                                    PlayerDetail.AddGold(gold);
                                    PlayerDetail.AddMoney(money);
                                    PlayerDetail.LogAddMoney(AddMoneyType.Game, AddMoneyType.Game_Shoot, PlayerDetail.PlayerCharacter.ID, money, PlayerDetail.PlayerCharacter.Money);
                                    PlayerDetail.AddGiftToken(giftToken);
                                    PlayerDetail.AddMedal(medal); //trminhpc
                                }
                            }
                        }
                    }
                    return(true);
                }
            }
            return(false);
        }