This is a way I handled it;
PlayerCombat:
This does the healing.
Code:
public Hit getMeleeHit(Player player, int damage) {
int shieldId = player.getEquipment().getShieldId();
if (shieldId == SHIELDID) {
int heal = (int) (damage * 0.20);
if (Utils.getRandom(100) <= 85) {
player.heal(heal);
}
}
return new Hit(player, damage, HitLook.MELEE_DAMAGE);
}
Player.java
Under
Code:
else if (shieldId == 13740) { // divine
int drain = (int) (Math.ceil(hit.getDamage() * 0.3) / 2);
if (prayer.getPrayerpoints() >= drain) {
hit.setDamage((int) (hit.getDamage() * 0.70));
prayer.drainPrayer(drain);
}
Add:
This does the damage, and takes prayer?
Code:
else if (shieldId == 29992) {
int drain = (int) (Math.ceil(hit.getDamage() * 0.3) / 2);
if (prayer.getPrayerpoints() >= drain) {
hit.setDamage((int) (hit.getDamage() * 0.75));
prayer.drainPrayer(drain);
}
}