예제 #1
0
    //Applies stat effect to effected entity
    //  Pre: PKMNEntity Effected is not null
    //  Post: PKMNEntity stats are changed in accordance with statsEffected
    public void applyEffect(PKMNEntity effected)
    {
        effected.addStatQ(this);

        for (int i = 0; i < statsEffected.Length; i++)
        {
            int curStat = statsEffected[i];

            if (curStat < BaseStat.BASE_STATS_LENGTH)
            {
                effected.changeStat(statFactor[i], statsEffected[i]);
            }
            else
            {
                effected.poisonUnit(statFactor[i]);
            }
        }
    }