Exemple #1
0
        // TODO: 金钟罩
        private void castGoldShieldSkill(int round = 1, int angryCost = 0)
        {
            BT_Logical     war      = owner._war;
            BT_MonsterTeam selfTeam = owner.ownerTeam;

            if (angryCost > 0)   // 扣怒气...
            {
                selfTeam.costAngry(angryCost);
            }

            short bufType  = CMsgHeader.BUFF_DEBUFF_GOLDDEFENSE;
            int   bufRound = round;

            CMsgSkillBuffDebuff msg = new CMsgSkillBuffDebuff(this);

            msg.type  = bufType;
            msg.round = bufRound;
            war.addMsgToRecorder(msg);

            BT_BuffOrDebuff buf = new BT_BuffOrDebuff()
            {
                type  = bufType,
                round = bufRound,
            };

            owner.addBuffOrDebuff(buf);
            msg.sufferArr = new int[] { owner.pveId };
        }
Exemple #2
0
        // TODO: 伤害加倍
        private void castHurtUpSkill(float rate, int round, int angryCost = 0)
        {
            BT_Logical     war      = owner._war;
            BT_MonsterTeam selfTeam = owner.ownerTeam;

            if (angryCost > 0)   // 扣怒气...
            {
                selfTeam.costAngry(angryCost);
            }

            short bufType  = CMsgHeader.BUFF_DEBUFF_HURTUP;
            int   bufRound = round;

            CMsgSkillBuffDebuff msg = new CMsgSkillBuffDebuff(this);

            msg.type  = bufType;
            msg.round = bufRound;
            war.addMsgToRecorder(msg);

            BT_Monster enemy = war.enemy(owner);

            BT_BuffOrDebuff debuf = new BT_BuffOrDebuff()
            {
                type  = bufType,
                round = bufRound,
                rate  = rate,
            };

            enemy.addBuffOrDebuff(debuf, false);
            msg.sufferArr = new int[] { enemy.pveId };
        }
Exemple #3
0
        // TODO: 护盾 0---固定值 1---百分比
        private void castShieldSkill(float addRate, int type = 0, int angryCost = 0)
        {
            BT_Logical     war      = owner._war;
            BT_MonsterTeam selfTeam = owner.ownerTeam;

            if (angryCost > 0)   // 扣怒气...
            {
                selfTeam.costAngry(angryCost);
            }

            float suckDmg = addRate;

            if (1 == type)
            {
                suckDmg = owner.curAtt * addRate * Consts.oneHundred;
            }

            short bufType = CMsgHeader.BUFF_DEBUFF_DEFENSE;

            CMsgSkillBuffDebuff msg = new CMsgSkillBuffDebuff(this);

            msg.type = bufType;
            msg.arg1 = MathHelper.MidpointRounding(suckDmg);
            war.addMsgToRecorder(msg);

            BT_BuffOrDebuff buf = new BT_BuffOrDebuff()
            {
                type    = bufType,
                suckDmg = MathHelper.MidpointRounding(suckDmg),
            };

            owner.addBuffOrDebuff(buf);
            msg.sufferArr = new int[] { owner.pveId };
        }
Exemple #4
0
        // TODO: 封印实现 ---效果呆实现... [here]
        private void castSealSkill(int sealCnt, int angryCost = 0)
        {
            BT_Logical     war       = owner._war;
            BT_MonsterTeam selfTeam  = owner.ownerTeam;
            BT_MonsterTeam enemyTeam = owner.vsTeam;

            if (angryCost > 0)   // 扣怒气...
            {
                selfTeam.costAngry(angryCost);
            }

            short bufType  = CMsgHeader.BUFF_DEBUFF_SEAL;
            int   bufRound = 1;

            CMsgSkillBuffDebuff msg = new CMsgSkillBuffDebuff(this);

            msg.type  = bufType;
            msg.round = bufRound;
            war.addMsgToRecorder(msg);

            int teamLen   = enemyTeam._team.Count;
            int sufferNum = 0;

            List <int> sufferList = new List <int>();

            for (int i = enemyTeam.curPetTeamIndex; i < teamLen && sufferNum < sealCnt; i++, sufferNum++)
            {
                BT_Monster      enemy = enemyTeam._team [i];
                BT_BuffOrDebuff buf   = new BT_BuffOrDebuff()
                {
                    type  = bufType,
                    round = bufRound,
                };
                enemy.addBuffOrDebuff(buf, false);
                sufferList.Add(enemy.pveId);
            }
            msg.sufferArr = sufferList.ToArray();
        }