Beispiel #1
0
        //重置奥义
        public void resetAoYi(BT_Skill sk, BT_MonsterTeam Team)
        {
            int        AoYiID   = sk.id;
            BattleAoYi workAoYi = null;

            if (Team.getTeamName == "Att")
            {
                workAoYi = this._attAoYi;
            }
            else
            {
                workAoYi = this._defAoYi;
            }
            //设置这个奥义未使用过
            workAoYi.resetCurAoYi(AoYiID);
        }
Beispiel #2
0
        //能否释放奥义技能
        public bool canCastAoYi(BT_Skill sk, BT_MonsterTeam Team)
        {
            int        AoYiID   = sk.id;
            BattleAoYi workAoYi = null;

            if (Team.getTeamName == "Att")
            {
                workAoYi = this._attAoYi;
            }
            else
            {
                workAoYi = this._defAoYi;
            }

            bool can = false;


            ConsoleEx.Write(" AY id = " + AoYiID + " name = " + Core.Data.dragonManager.getAoYiData(AoYiID).name, "yellow");
            if (workAoYi.isFirstAoYi(AoYiID))
            {
                if (workAoYi.curAoYiCast(AoYiID) == false)
                {
                    can = true;
                }
            }
            else
            {
                //前一个是否已经使用过
                bool pre = workAoYi.prevAoYiCast(AoYiID);
                bool cur = workAoYi.curAoYiCast(AoYiID);

                //wxl
                if (/*pre == true &&*/ cur == false)
                {
                    can = true;
                }
            }


            return(can);
        }
Beispiel #3
0
        //keep singleton
        public BT_Logical(ClientData netdata)
        {
            _battleStatus = CMsgHeader.STATUS_WAR_BEGIN;

            //客户端不计算世界boss的战斗
            _isWorldBoss = 0;
            //战斗统计信息
            statictis = new BT_Statictis();
            //初始化Manager
            DragonManager dragonMgr = Core.Data.dragonManager;
            SkillManager  skillMgr  = Core.Data.skillManager;

            if (netdata != null)
            {
                //初始化奥义
                _attAoYi = new BattleAoYi(netdata.attAoYi, dragonMgr, skillMgr);
                _defAoYi = new BattleAoYi(netdata.defAoYi, dragonMgr, skillMgr);

                //初始化队伍
//				_attTeam = new BT_MonsterTeam(netdata.attTeam, this, 0, "Att", _attAoYi, _defAoYi);
//				int attTeamCnt = _attTeam._team.Count;


                //wxl
//				Battle_Monster tBM = netdata.defTeam.team [netdata.defTeam.team.Length - 1];
//				if (tBM != null) {
//					tBM.petNum = 10105;
//					tBM.property = 10;
//					//21006,21014,25006
//					tBM.lvl = 30;
//
//					SkillObj oneObj = new SkillObj ();
//					oneObj.skillId = 21006;
//					oneObj.skillLevel = 30;
//					SkillObj twoObj = new SkillObj ();
//					twoObj.skillId = 21014;
//					twoObj.skillLevel = 2;
//					SkillObj threeObj = new SkillObj ();
//					twoObj.skillId = 25006;
//					twoObj.skillLevel = 2;
//					tBM.skill = new SkillObj[3]{oneObj,twoObj,threeObj};
//					tBM.finalAtt = 8000;
//
//				}
//				for (int i = 0; i < netdata.defTeam.team.Length; i++) {
//					netdata.defTeam.team [i] = tBM;
//				}

//				for (int i = 0; i < netdata.attTeam.team.Length; i++) {
//					netdata.attTeam.team [i] = tBM;
//				}
                _attTeam = new BT_MonsterTeam(netdata.attTeam, this, 0, "Att", _attAoYi, _defAoYi);
                int attTeamCnt = _attTeam._team.Count;
                _defTeam = new BT_MonsterTeam(netdata.defTeam, this, attTeamCnt, "Def", _defAoYi, _attAoYi);

                _attTeam.setupRelation(_defTeam);
                _defTeam.setupRelation(_attTeam);

                m_ShabuReplay = false;
            }

            //分步战斗的数据初始化
            init();
            //初始化战斗结果,默认是输
            initWar();
            //战斗结果的存储地方
            _warRecorder = new List <CMsgHeader>();
        }
        public BT_MonsterTeam(Battle_Data data, BT_Logical war, int pveIndexStart, string tName, BattleAoYi attAoyi, BattleAoYi defAoyi)
        {
            _tName = tName;
            if (!string.IsNullOrEmpty(data.roleId))
            {
                _usrId = Convert.ToInt32(data.roleId);
            }
            _team = new List <BT_Monster>();

            foreach (Battle_Monster mon in data.team)
            {
                if (mon != null)
                {
                    BT_Monster pet = new BT_Monster(mon, pveIndexStart + _team.Count, war, this, null);
                    //计算神龙奥义的加成
                    attAoyi.improveAttribute(pet);
                    attAoyi.enHanceSkillPossibility(pet);
                    attAoyi.improveAoYiPossibility();
                    defAoyi.reduceSkillPossibility(pet);

                    _team.Add(pet);
                }
            }
            //加入奥义的技能
            attAoyi.trickAoYiToSkill(_team);
            this.teamLenChanged();
            this._curPet = 0;
        }