Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int weaponId = player.getEquipment().getWeaponId();
- int attackStyle = player.getCombatDefinitions().getAttackStyle();
- int maxhit;
- if (PlayerCombat.isRanging(player) == 0) {
- double strengthLvl = player.getSkills().getLevel(Skills.STRENGTH);
- int xpStyle = CombatDefinitions.getXpStyle(weaponId, attackStyle);
- double styleBonus = xpStyle == Skills.STRENGTH ? 3 : xpStyle == CombatDefinitions.SHARED ? 1 : 0;
- double otherBonus = 1;
- if (PlayerCombat.fullDharokEquipped(player)) {
- double hp = player.getHitpoints();
- double maxhp = player.getMaxHitpoints();
- double d = hp / maxhp;
- otherBonus = 2 - d;
- }
- double effectiveStrength = 8
- + Math.floor((strengthLvl * player.getPrayer().getStrengthMultiplier()) + styleBonus);
- if (PlayerCombat.fullVoidEquipped(player, 11665, 11676))
- effectiveStrength = Math.floor(effectiveStrength * 1.1);
- double strengthBonus = player.getCombatDefinitions().getBonuses()[CombatDefinitions.STRENGTH_BONUS];
- if (weaponId == -2) {
- strengthBonus += 82;
- }
- double baseDamage = 5 + effectiveStrength * (1 + (strengthBonus / 64));
- maxhit = (int) Math.floor(baseDamage * 1 * otherBonus);
- } else {
- double rangedLvl = player.getSkills().getLevel(Skills.RANGE);
- double styleBonus = attackStyle == 0 ? 3 : attackStyle == 1 ? 0 : 1;
- double otherBonus = 1;
- double effectiveStrenght = Math.floor(rangedLvl * player.getPrayer().getRangeMultiplier())
- + styleBonus;
- if (PlayerCombat.fullVoidEquipped(player, 11664, 11675))
- effectiveStrenght += Math.floor((player.getSkills().getLevelForXp(Skills.RANGE) / 5) + 1.6);
- double strengthBonus = player.getCombatDefinitions()
- .getBonuses()[CombatDefinitions.RANGED_STR_BONUS];
- double baseDamage = 5 + (((effectiveStrenght + 8) * (strengthBonus + 64)) / 64);
- maxhit = (int) Math.floor(baseDamage * 1 * otherBonus);
- }
Advertisement
Add Comment
Please, Sign In to add comment