Пример #1
0
        private IEnumerator LaunchFireball(GameObject target)
        {
            float   launchDuration = 1f;
            float   elapsedTime    = 0;
            Vector3 origin         = Fireball.transform.position;

            while (elapsedTime < launchDuration)
            {
                Fireball.transform.position = Vector3.Lerp(
                    origin,
                    target.transform.position,
                    elapsedTime / launchDuration);
                elapsedTime += Time.deltaTime;
                yield return(null);
            }

            Fireball.SetActive(false);

            Attack attack = new Attack(CurrentDamage);

            target.GetComponent <Combatant>()
            .Defend(attack);

            CombatSystem.EndTurn(this.GetComponentInParent <Combatant>().gameObject);
        }
Пример #2
0
        protected override void EndAbility()
        {
            Debug.Log($"Bonk Damage total: {Damage}");

            CurrentPhase = Phase.Inactive;

            CombatSystem.EndTurn(this.GetComponentInParent <Combatant>().gameObject);
        }
Пример #3
0
    protected override void EndAbility()
    {
        Thunder.SetActive(false);

        Animator.SetBool("IsFinishedCasting", true);

        CombatSystem.EndTurn(this.GetComponentInParent <Combatant>().gameObject);
    }
Пример #4
0
    private IEnumerator FinishRevolverDamage()
    {
        int    revolverdamage = (int)CalculateRevolverDamage();
        Attack attack         = new Attack(revolverdamage);

        TargetedCombatants[0].GetComponent <Combatant>().Defend(attack);

        yield return(new WaitForSeconds(1.0f));

        CombatSystem.EndTurn(this.GetComponentInParent <Combatant>().gameObject);
    }
Пример #5
0
        protected override void EndAbility()
        {
            StopAllCoroutines();
            Timer.StopTimer();

            Debug.Log($"Supercharge Damage total: {Damage}");

            CurrentPhase = Phase.Inactive;

            CombatSystem.EndTurn(this.GetComponentInParent <Combatant>().gameObject);
        }
Пример #6
0
    public IEnumerator DealConfectionDamage()
    {
        //Only deals damage to one enemy
        Attack attack = new Attack(CalculateTotalDamage());

        Target.GetComponent <Combatant>().Defend(attack);
        ConfectionMixVfx.ExplodeConfectionMix();

        yield return(new WaitForSeconds(1.0f));

        ConfectionMixVfx.ResetVfx();
        CombatSystem.EndTurn(this.GetComponentInParent <Combatant>().gameObject);
    }
Пример #7
0
    protected override void EndAbility()
    {
        Debug.Log($"Magic Shield Total Health: {MagicShieldHealth}");

        MagicShieldSound.Play();

        foreach (GameObject target in TargetedCombatants)
        {
            target.GetComponent <Combatant>().ApplyShield(MagicShieldHealth);
        }

        Animator.SetBool("IsFinishedCasting", true);

        CombatSystem.EndTurn(this.GetComponentInParent <Combatant>().gameObject);
    }
Пример #8
0
 public override void EndTurn()
 {
     // for now do nothing lmao
     CombatSystem.EndTurn(this.gameObject);
 }
Пример #9
0
 public override void EndTurn()
 {
     CombatSystem.EndTurn(this.gameObject);
 }