Esempio n. 1
0
    public virtual IEnumerator SetStatusEffect(StatusEffects aStatusEffect)
    {
        m_StatusEffectsOnCreature.Add(aStatusEffect);

        yield return(new WaitForSeconds(0.1f));

        FloatingUiElementsController.CreateFloatingText(0.ToString(), m_SpawnObject.transform, FloatingUiElementsController.UiElementType.Attackup, m_IsUi);
        yield return(new WaitForSeconds(2.7f));

        TacticsManager.instance.CharacterSkillFinished(this, PressTurnManager.PressTurnReactions.Normal);
    }
Esempio n. 2
0
    public virtual IEnumerator IncrementMana(int Increment)
    {
        m_CurrentMana += Increment;

        if (m_CurrentMana >= m_MaxMana)
        {
            m_CurrentMana = m_MaxMana;
        }

        yield return(new WaitForSeconds(0.5f));

        FloatingUiElementsController.CreateFloatingText(Increment.ToString(), m_SpawnObject.transform,
                                                        FloatingUiElementsController.UiElementType.Text, m_IsUi);

        yield return(new WaitForSeconds(0.8f));

        TacticsManager.instance.CharacterSkillFinished(this, PressTurnManager.PressTurnReactions.Normal);
    }
Esempio n. 3
0
    public override IEnumerator DecrementHealth(int Decrementby, Skills.ElementalType elementalType, float TimeTillInitalDamage, float TimeTillHoveringUiElement, float TimeTillDamage)
    {
        string AttackingElement  = elementalType.ToString();
        string ElementalWeakness = elementalWeakness.ToString();
        string ElementalStrength = elementalStrength.ToString();

        int   ArgumentReference = Decrementby;
        float ConvertToFloat    = ArgumentReference / 1.5f;
        int   ConvertToInt      = Mathf.CeilToInt(ConvertToFloat);

        Decrementby = ConvertToInt;

        PressTurnManager.PressTurnReactions PressturnReaction = PressTurnManager.PressTurnReactions.Normal;


        if (AttackingElement.Equals(ElementalWeakness))
        {
            Decrementby += Decrementby / 4;
            yield return(new WaitForSeconds(TimeTillHoveringUiElement));

            FloatingUiElementsController.CreateFloatingText(Decrementby.ToString(), m_SpawnObject.transform, FloatingUiElementsController.UiElementType.Weak, m_IsUi);
            PressturnReaction = PressTurnManager.PressTurnReactions.Weak;
        }
        if (AttackingElement.Equals(ElementalStrength))
        {
            Decrementby -= Decrementby / 4;
            yield return(new WaitForSeconds(TimeTillHoveringUiElement));

            FloatingUiElementsController.CreateFloatingText(Decrementby.ToString(), m_SpawnObject.transform, FloatingUiElementsController.UiElementType.Strong, m_IsUi);
            PressturnReaction = PressTurnManager.PressTurnReactions.Strong;
        }


        yield return(new WaitForSeconds(TimeTillInitalDamage));

        FloatingUiElementsController.CreateFloatingText(Decrementby.ToString(), m_SpawnObject.transform, FloatingUiElementsController.UiElementType.Text, m_IsUi);
        m_CurrentHealth -= Decrementby;
        DeathCheck();
        // m_Status.RedTest();
        yield return(new WaitForSeconds(3.0f));

        TacticsManager.instance.CharacterSkillFinished(this, PressturnReaction);
    }
Esempio n. 4
0
 public virtual void DecrementHealth(int Decremenby)
 {
     FloatingUiElementsController.CreateFloatingText(Decremenby.ToString(), m_SpawnObject.transform, FloatingUiElementsController.UiElementType.Text, m_IsUi);
     m_CurrentHealth -= Decremenby;
 }