Exemplo n.º 1
0
    /***EFFECTS***/
    //Check the effects of the tile a target is standing on and apply them
    private void TileEffects(Tile.EFFECT e)
    {
        switch (e)
        {
        //Lose accuracy
        case Tile.EFFECT.HIDDEN:
            hitChance -= 35;
            if (hitChance < 0)
            {
                hitChance = 0;
            }
            break;

        case Tile.EFFECT.OBSCURED:
            hitChance -= 15;
            if (hitChance < 0)
            {
                hitChance = 0;
            }
            break;

        //Defense
        case Tile.EFFECT.COVER:
            physicalDmg -= 3;
            if (physicalDmg < 0)
            {
                physicalDmg = 0;
            }
            break;

        case Tile.EFFECT.FORTIFIED:
            physicalDmg -= 5;
            if (physicalDmg < 0)
            {
                physicalDmg = 0;
            }
            break;

        //Stability
        case Tile.EFFECT.GROUNDED:
            techDmg = (int)(techDmg * 0.65f);
            if (techDmg < 0)
            {
                techDmg = 0;
            }
            break;

        case Tile.EFFECT.SOGGY:
            techDmg = (int)(techDmg * 2f);
            break;

        default: break;
        }
    }
    /// <summary>
    /// Check tile effects at the start of an entity's turn (when the speed gauge is full)
    /// </summary>
    /// <param name="e">The effect to be checked</param>
    public void TileEffectsTurn(Tile.EFFECT e)
    {
        switch (e)
        {
        //Restore HP
        case Tile.EFFECT.RECOVERY:
            user.Hp += 3;
            break;

        //Lose HP
        case Tile.EFFECT.HAZARD:
            user.Hp -= 3;
            break;
        }
    }
Exemplo n.º 3
0
    /// <summary>
    /// Check tile effects at the start of an entity's turn (when the speed gauge is full)
    /// </summary>
    /// <param name="e">The effect to be checked</param>
    public void TileEffectsTurn(Tile.EFFECT e)
    {
        user.Spd = user.baseSpd;

        switch (e)
        {
        //Restore HP
        case Tile.EFFECT.RECOVERY:
            user.Hp += 3;
            break;

        //Speed
        case Tile.EFFECT.STUCK:
            user.Spd /= 2;

            break;
        }
    }
Exemplo n.º 4
0
    /***EFFECTS***/
    //Check the effects of the tile a target is standing on and apply them
    private void TileEffects(Tile.EFFECT e)
    {
        switch (e)
        {
        //Lose accuracy
        case Tile.EFFECT.HIDDEN:
            if (activeSpecial != null)
            {
                if (!activeSpecial.self_target)
                {
                    hitChance -= 35;                                 //Self-targeting moves don't suffer aim penalties
                }
            }
            else
            {
                hitChance -= 35;
            }

            if (hitChance < 0)
            {
                hitChance = 0;
            }
            break;

        case Tile.EFFECT.OBSCURED:
            if (activeSpecial != null)
            {
                if (!activeSpecial.self_target)
                {
                    hitChance -= 15;                                 //Self-targeting moves don't suffer aim penalties
                }
            }
            else
            {
                hitChance -= 35;
            }

            if (hitChance < 0)
            {
                hitChance = 0;
            }
            break;

        //Defense
        case Tile.EFFECT.COVER:
            physicalDmg -= 3;
            if (physicalDmg < 0)
            {
                physicalDmg = 0;
            }
            break;

        case Tile.EFFECT.FORTIFIED:
            physicalDmg -= 5;
            if (physicalDmg < 0)
            {
                physicalDmg = 0;
            }
            break;

        //Stability
        case Tile.EFFECT.GROUNDED:
            techDmg = (int)(techDmg * 0.65f);
            if (techDmg < 0)
            {
                techDmg = 0;
            }
            break;

        case Tile.EFFECT.SOGGY:
            techDmg = (int)(techDmg * 2f);
            break;

        default: break;
        }
    }