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