コード例 #1
0
ファイル: LiveMonster.cs プロジェクト: jayrulez/TOMClassic
        public void Next(float pastRound, bool tileMatching)//附带判断地形因素
        {
            roundPast++;
            pastRoundTotal += pastRound;

            HpBar.Update();
            SkillAssistant.CheckAuroState(this, tileMatching);

            if (pastRoundTotal >= 1)
            {
                pastRoundTotal -= 1;
                HpBar.OnRound();
                if (WeaponId > 0)
                {
                    Weapon.OnRound();
                }
            }

            BuffManager.BuffCount();

            if (SkillManager.CheckSpecial(pastRound))
            {
                return;//特殊技能触发
            }

            aiController.CheckAction();
        }
コード例 #2
0
ファイル: LiveMonster.cs プロジェクト: jayrulez/TOMClassic
        public bool BeHited(LiveMonster src)
        {
            int hitrate = SkillAssistant.GetHit(src, this);

            if (hitrate > MathTool.GetRandom(100))
            {
                HitDamage damage = SkillAssistant.GetDamage(src, this);
                CheckDamageBuffEffect(src, damage);

                HpBar.OnDamage(damage);
                SkillAssistant.CheckHitEffectAfter(src, this, damage);
                if (src.WeaponId > 0)
                {
                    src.Weapon.OnHit();
                }
                if (WeaponId > 0)
                {
                    Weapon.OnHited();
                }
                if (damage.Value > 0)
                {
                    BuffManager.CheckRecoverOnHit();
                    lastDamagerId  = src.Id;
                    peakDamagerLuk = Math.Max(peakDamagerLuk, src.RealLuk);
                }
                return(true);
            }
            return(false);
        }
コード例 #3
0
ファイル: LiveMonster.cs プロジェクト: jayrulez/TOMClassic
 public void HitTarget(LiveMonster target, bool isMelee)
 {
     if (target != null)
     {
         SkillAssistant.CheckBurst(this, target, isMelee);
         bool isMiss = !target.BeHited(this);
         if (isMiss)
         {
             BattleManager.Instance.FlowWordQueue.Add(new FlowWord("Miss!", new Point(Position.X + 40, Position.Y + 40), 0, "red", -10, 0), false);
         }
     }
 }