public void tick()
    {
        tick++;
        switch(type)
        {
            case 1:
                allyBar[0].tick();
                allyBar[1].tick();
                enemyBar[0].tick();
                enemyBar[1].tick();
                if(tick == 180)
                {
                    tick += ally.autoAttack(enemy) * 141;
                    enemyBar[0].set(enemy.getHPRatio());
                    enemyBar[1].set(enemy.getMPRatio());
                }
                else if(tick == 320)
                {
                    tick += enemy.autoAttack(ally) * 141;
                    allyBar[0].set(ally.getHPRatio());
                    allyBar[1].set(ally.getMPRatio());
                }
                else if(tick == 600)
                {
                    ally.done();
                    Game.gui.closeWindow();
                }
                break;
        }
    }