public static void handlePrayerDrain(Player c) { c.usingPrayer = false; double toRemove = 0.0; if (c.isDead || c.playerLevel[3] <= 0) return; for (int j = 0; j < prayerData.length; j++) { if (c.prayerActive[j]) { toRemove += prayerData[j] / 20; c.usingPrayer = true; } } if (toRemove > 0) { toRemove /= (1 + (0.035 * c.playerBonus[11])); } c.prayerPoint -= toRemove; if (c.prayerPoint <= 0) { c.prayerPoint = 1.0 + c.prayerPoint; reducePrayerLevel(c); } }