예제 #1
0
        private IEnumerator Poison(BattleAgentController self, BattleAgentController enemy)
        {
            int count = 0;

            //int hurt = poisonBase * skillLevel + self.agent.extraPoisonHurt;

            while (count < poisonDuration)
            {
                if (enemy != null && !enemy.isDead)
                {
                    enemy.AddHurtAndShow(poisonHurt, HurtType.Physical, self.towards);

                    bool fightEnd = enemy.CheckFightEnd();

                    enemy.UpdateStatusPlane();

                    if (fightEnd)
                    {
                        yield break;
                    }

                    yield return(new WaitForSeconds(1.0f));
                }

                count++;
            }
        }
예제 #2
0
        private IEnumerator DurativeHurt(BattleAgentController self, BattleAgentController enemy)
        {
            int count = 0;

            while (count < healthLoseDuration)
            {
                if (enemy != null && !enemy.isDead)
                {
                    enemy.AddHurtAndShow(healthLoseBase, HurtType.Physical, self.towards);

                    bool fightEnd = enemy.CheckFightEnd();

                    enemy.UpdateStatusPlane();

                    if (fightEnd)
                    {
                        yield break;
                    }

                    yield return(new WaitForSeconds(1.0f));
                }


                count++;
            }
        }
예제 #3
0
        private IEnumerator DurativePoison(BattleAgentController self, BattleAgentController enemy)
        {
            int count = 0;

            int hurt = durativeHurtBase * skillLevel + extraHurtBase;

            while (count < duration)
            {
                if (enemy != null && !enemy.isDead)
                {
                    SetEffectAnims(self, enemy);

                    enemy.AddHurtAndShow(hurt, HurtType.Physical, self.towards);

                    bool fightEnd = enemy.CheckFightEnd();

                    enemy.UpdateStatusPlane();

                    if (fightEnd)
                    {
                        yield break;
                    }

                    yield return(new WaitForSeconds(1f));
                }

                count++;
            }
        }
        private IEnumerator DurativeHurt(BattleAgentController self, BattleAgentController enemy)
        {
            int count = 0;

            while (count < hurtDuration)
            {
                if (enemy != null && !enemy.isDead)
                {
                    SetEffectAnims(self, enemy);

                    enemy.AddHurtAndShow(hurtBase, HurtType.Physical, self.towards);

                    enemy.CheckFightEnd();

                    enemy.UpdateStatusPlane();

                    yield return(new WaitForSeconds(1f));
                }

                count++;
            }
        }
        private IEnumerator ExcuteAgentPropertyChange(BattleAgentController ba)
        {
            float timer = 0f;

            while (timer < duration)
            {
                ba.propertyCalculator.InstantPropertyChange(ba, propertyType, skillSourceValue);

                propertyChange += skillSourceValue;

                timer += 1f;

                if (ba.CheckFightEnd())
                {
                    CancelSkillEffect(true);
                }

                yield return(new WaitForSeconds(1.0f));
            }

            ba.propertyCalculator.RemoveAttachedSkill <TriggeredSkill> (this);
        }