Health and damage are now doubles, not ints.

This commit is contained in:
GJ
2013-07-11 12:43:36 -04:00
parent 4dc9c97978
commit d07b67b5bf
17 changed files with 65 additions and 65 deletions

View File

@ -68,7 +68,7 @@ public class ArcheryManager extends SkillManager {
* @param damage The amount of damage initially dealt by the event
* @return the modified event damage if the ability was successful, the original event damage otherwise
*/
public int dazeCheck(Player defender, int damage) {
public double dazeCheck(Player defender, double damage) {
if (SkillUtils.activationSuccessful(getSkillLevel(), getActivationChance(), Archery.dazeMaxBonus, Archery.dazeMaxBonusLevel)) {
Location dazedLocation = defender.getLocation();
dazedLocation.setPitch(90 - Misc.getRandom().nextInt(181));
@ -96,9 +96,9 @@ public class ArcheryManager extends SkillManager {
* @param damage The amount of damage initially dealt by the event
* @return the modified event damage
*/
public int skillShotCheck(int damage) {
public double skillShotCheck(double damage) {
double damageBonusPercent = Math.min(((getSkillLevel() / Archery.skillShotIncreaseLevel) * Archery.skillShotIncreasePercentage), Archery.skillShotMaxBonusPercentage);
int archeryBonus = (int) (damage * damageBonusPercent);
double archeryBonus = damage * damageBonusPercent;
return damage + archeryBonus;
}