Exemplo n.º 1
0
    public bool OnTurnStart()
    {
        if (health.x <= 0)
        {
            return(false);
        }
        bool startTurn = true;

        if (modifiers.IsStunned)
        {
            startTurn = false;
            modifiers.ClearStun();
        }
        int damage = 0;

        foreach (StatusEffect e in modifiers.Bleed)
        {
            damage += e.ApplyOverTime(unit);
        }
        if (damage > 0)
        {
            unit.CreatePopUpText(damage.ToString(), ColorPallete.GetColor("Red"));
        }
        int stress = 0;

        foreach (StatusEffect e in modifiers.Terror)
        {
            stress += e.ApplyOverTime(unit);
        }
        if (stress > 0)
        {
            unit.CreatePopUpText(stress.ToString(), ColorPallete.GetColor("Purple"));
        }
        modifiers.OnTurnBegin();
        if (health.x <= 0)
        {
            return(false);
        }
        return(startTurn);
    }