예제 #1
0
        public override bool Proc(EntityParent theOwner)
        {
            //todo检查队友数量
            int num = MogoWorld.MonsterCount;

            return(CmpTypeMethod.Cmp(_cmp, num, _num));
        }
예제 #2
0
        public override bool Proc(EntityParent theOwner)
        {
            //todo检查自身血量
            int percent = (int)(theOwner.PercentageHp * 100);

            return(CmpTypeMethod.Cmp(_cmp, percent, _percent));
        }
예제 #3
0
        public override bool Proc(EntityParent theOwner)
        {
            //todo计算概率
            int rate = Mogo.Util.RandomHelper.GetRandomInt(0, 100);

            return(CmpTypeMethod.Cmp(_cmp, rate, _rate));
        }
예제 #4
0
        public override bool Proc(EntityParent theOwner)
        {
            //todo检查目标血量
            if (!MogoWorld.Entities.ContainsKey(theOwner.blackBoard.enemyId))
            {//没有目标
                return(false);
            }
            EntityParent target  = MogoWorld.Entities[theOwner.blackBoard.enemyId];
            int          percent = (int)(target.PercentageHp * 100);

            return(CmpTypeMethod.Cmp(_cmp, percent, _percent));
        }
예제 #5
0
        public override bool Proc(EntityParent theOwner)
        {
            int  tmpSkillUseCount = theOwner.GetSkillUseCount(_skillId);
            bool rnt = CmpTypeMethod.Cmp(_cmp, tmpSkillUseCount, _useCount);

            if (rnt == true)
            {
                //Mogo.Util.LoggerHelper.Debug("AI:" + "CmpSkillUseCount:" + _skillId + " true");
            }
            else
            {
                //Mogo.Util.LoggerHelper.Debug("AI:" + "CmpSkillUseCount:" + _skillId + "false");
            }
            return(rnt);
        }
예제 #6
0
        public override bool Proc(EntityParent theOwner)
        {
            //todo检查敌人数量
            int  num = theOwner.GetEnemyNum();
            bool rnt = CmpTypeMethod.Cmp(_cmp, num, _num);

            if (rnt == true)
            {
                //Mogo.Util.LoggerHelper.Debug("AI:" + "CmpEnemyNum:" + "true");
            }
            else
            {
                //Mogo.Util.LoggerHelper.Debug("AI:" + "CmpEnemyNum:" + "false");
            }
            return(rnt);
        }
예제 #7
0
        public override bool Proc(EntityParent theOwner)
        {
            //todo检查与之前使用技能时候所在坐标距离
            float testDis = Vector3.Distance(theOwner.blackBoard.lastCastCoord, theOwner.Transform.position);
            bool  rnt     = CmpTypeMethod.Cmp(_cmp, (int)(testDis * 100), _distance);

            if (rnt)
            {
                //Mogo.Util.LoggerHelper.Debug("AI:" + "CmpLastSkillCoord:" + "true");
            }
            else
            {
                //Mogo.Util.LoggerHelper.Debug("AI:" + "CmpLastSkillCoord:" + "false");
            }

            return(rnt);
        }
예제 #8
0
        public override bool Proc(EntityParent theOwner)
        {
            //todo检查与之前使用技能时候所在坐标距离
            EntityParent target = theOwner.GetTargetEntity();

            if (target == null || target.Transform == null)
            {
                //Mogo.Util.LoggerHelper.Debug("AI:" + "CmpTargetDistance:" + "false");
                return(false);
            }
            float testDis = Vector3.Distance(target.Transform.position, theOwner.Transform.position);
            bool  rnt     = CmpTypeMethod.Cmp(_cmp, (int)(testDis * 100), _distance);

            if (rnt)
            {
                //Mogo.Util.LoggerHelper.Debug("AI:" + "CmpTargetDistance:" + "true");
            }
            else
            {
                //Mogo.Util.LoggerHelper.Debug("AI:" + "CmpTargetDistance:" + "false");
            }

            return(rnt);
        }