Some WIP work on Archery, most noteably a damage boost per 50 skill lvl

This commit is contained in:
nossr50 2012-04-02 04:41:04 -07:00
parent 6a858dace7
commit e40e10da61
2 changed files with 17 additions and 0 deletions

View File

@ -8,6 +8,7 @@ Key:
- Removal - Removal
Version 1.3.05-dev Version 1.3.05-dev
+ Added bonus damage to Archery, every 50 levels you gain 10% bonus damage
+ Added ExperienceAPI and PartyAPI classes for developer use + Added ExperienceAPI and PartyAPI classes for developer use
= Fixed errors when Spout would disable itself after start-up = Fixed errors when Spout would disable itself after start-up
= Fixed XP bar not updating when XP was gained = Fixed XP bar not updating when XP was gained

View File

@ -193,6 +193,22 @@ public class Combat {
int damage = event.getDamage(); int damage = event.getDamage();
if (mcPermissions.getInstance().archery(attacker) && damage > 0) { if (mcPermissions.getInstance().archery(attacker) && damage > 0) {
/*Archery needs a damage bonus to be viable in PVP*/
int skillLvl = Users.getProfile(attacker).getSkillLevel(SkillType.ARCHERY);
double dmgBonusPercent = ((skillLvl / 50) * 0.1D);
/* Cap maximum bonus at 100% */
if(dmgBonusPercent > 2)
dmgBonusPercent = 2;
/* Every 100 skill levels Archery gains 20% damage bonus, set that here */
//TODO: Work in progress for balancing out Archery, will work on it more later...
//System.out.println("DEBUG 0: "+event.getDamage());
int archeryBonus = (int)(event.getDamage() * dmgBonusPercent);
event.setDamage(event.getDamage() + archeryBonus);
//System.out.println("DEBUG 1: "+event.getDamage());
if (mcPermissions.getInstance().trackArrows(attacker)) { if (mcPermissions.getInstance().trackArrows(attacker)) {
Archery.trackArrows(pluginx, target, PPa); Archery.trackArrows(pluginx, target, PPa);
} }