mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 21:26:46 +01:00
Some WIP work on Archery, most noteably a damage boost per 50 skill lvl
This commit is contained in:
parent
6a858dace7
commit
e40e10da61
@ -8,6 +8,7 @@ Key:
|
||||
- Removal
|
||||
|
||||
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
|
||||
= Fixed errors when Spout would disable itself after start-up
|
||||
= Fixed XP bar not updating when XP was gained
|
||||
|
@ -193,6 +193,22 @@ public class Combat {
|
||||
int damage = event.getDamage();
|
||||
|
||||
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)) {
|
||||
Archery.trackArrows(pluginx, target, PPa);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user