Fixed artifact ability leveling for Graceful Dodge / Dodge (Or any
similarly-named artifact abilities in general. Made AoE less useful for gaining artifact XP.
This commit is contained in:
parent
6bfec6a3ce
commit
1fc4adb469
Binary file not shown.
@ -495,7 +495,9 @@ public class CustomDamage {
|
||||
giveAbsorptionHealth(p);
|
||||
reduceKnockback(p);
|
||||
reduceSwiftAegisBuff(p);
|
||||
if (damage<p.getHealth()) {increaseArtifactArmorXP(p,(int)damage);}
|
||||
if (!isFlagSet(flags,NOAOE)) {
|
||||
if (damage<p.getHealth()) {increaseArtifactArmorXP(p,(int)damage);}
|
||||
}
|
||||
aPlugin.API.showDamage(target, GetHeartAmount(damage));
|
||||
Bukkit.getScheduler().scheduleSyncDelayedTask(TwosideKeeper.plugin,new Runnable() {
|
||||
@Override
|
||||
@ -571,19 +573,21 @@ public class CustomDamage {
|
||||
double ratio = 1.0-CalculateDamageReduction(1,target,p);
|
||||
if (p.getEquipment().getItemInMainHand().getType()!=Material.BOW) {
|
||||
//Do this with a 1 tick delay, that way it can account for items that are dropped one tick earlier and still work.
|
||||
Bukkit.getScheduler().scheduleSyncDelayedTask(TwosideKeeper.plugin, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
AwakenedArtifact.addPotentialEXP(p.getEquipment().getItemInMainHand(), (int)((ratio*20)+5)*((isFlagSet(flags,IS_HEADSHOT))?2:1), p);
|
||||
}
|
||||
},1);
|
||||
if (!isFlagSet(flags,NOAOE)) {
|
||||
Bukkit.getScheduler().scheduleSyncDelayedTask(TwosideKeeper.plugin, new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
AwakenedArtifact.addPotentialEXP(p.getEquipment().getItemInMainHand(), (int)((ratio*20)+5)*((isFlagSet(flags,IS_HEADSHOT))?2:1), p);
|
||||
}
|
||||
},1);
|
||||
}
|
||||
} else {
|
||||
pd.storedbowxp+=(int)((ratio*20)+5)*((isFlagSet(flags,IS_HEADSHOT))?2:1);
|
||||
pd.lasthittarget=TwosideKeeper.getServerTickTime();
|
||||
}
|
||||
increaseArtifactArmorXP(p,(int)(ratio*10)+1);
|
||||
List<LivingEntity> hitlist = new ArrayList<LivingEntity>();
|
||||
if (!isFlagSet(flags,NOAOE)) {
|
||||
increaseArtifactArmorXP(p,(int)(ratio*10)+1);
|
||||
hitlist = getAOEList(weapon,target);
|
||||
}
|
||||
|
||||
|
@ -258,7 +258,7 @@ public enum ArtifactAbility {
|
||||
if (containsEnchantment(ability,item)) {
|
||||
//We just need to find the line and upgrade it then.
|
||||
for (int i=0;i<lore.size();i++) {
|
||||
if (lore.get(i).contains(ability.GetName())) {
|
||||
if (lore.get(i).equalsIgnoreCase(ability.GetName())) {
|
||||
//This is the line! Modify it.
|
||||
lore.set(i, ChatColor.YELLOW+" "+ability.GetName()+" "+(lv));
|
||||
break;
|
||||
|
@ -4016,11 +4016,6 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
|
||||
return;
|
||||
}
|
||||
|
||||
if (GenericFunctions.isArtifactEquip(ev.getItemInHand()) &&
|
||||
ev.getItemInHand().getType().toString().contains("HOE")) {
|
||||
AwakenedArtifact.addPotentialEXP(ev.getItemInHand(), 4, ev.getPlayer());
|
||||
}
|
||||
|
||||
if (ev.getItemInHand().hasItemMeta() &&
|
||||
ev.getItemInHand().getItemMeta().hasLore() &&
|
||||
ev.getItemInHand().getItemMeta().getLore().size()>=4 &&
|
||||
@ -6885,10 +6880,10 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
|
||||
if (ev.getState().equals(State.CAUGHT_FISH)) {
|
||||
Player p = ev.getPlayer();
|
||||
if (p!=null) {
|
||||
if (GenericFunctions.isArtifactEquip(p.getEquipment().getItemInMainHand()) &&
|
||||
/*if (GenericFunctions.isArtifactEquip(p.getEquipment().getItemInMainHand()) &&
|
||||
GenericFunctions.isArtifactWeapon(p.getEquipment().getItemInMainHand())) {
|
||||
AwakenedArtifact.addPotentialEXP(p.getEquipment().getItemInMainHand(), 12, p);
|
||||
}
|
||||
}*/
|
||||
if (GenericFunctions.isWeapon(p.getEquipment().getItemInMainHand())) {
|
||||
GenericFunctions.RemovePermEnchantmentChance(p.getEquipment().getItemInMainHand(), p);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user