public double mageDefTest() {
        double defenceBonus = c.playerBonus[8] == 0 ? 1 : c.playerBonus[8];	
		if(defenceBonus < 50)//1
			defenceBonus = 50;//1
		double defenceCalc = defenceBonus * c.playerLevel[1];
        if (c.prayerActive[0]) 
            defenceCalc *= 1.05;
        else if (c.prayerActive[3]) 
            defenceCalc *= 1.10;
        else if (c.prayerActive[9])
            defenceCalc *= 1.15;
        else if (c.prayerActive[18])
            defenceCalc *= 1.20;
        else if (c.prayerActive[19])
            defenceCalc *= 1.25;
        return defenceCalc;
    }