Added a small explosion effect when hitting things in Sniping mode.
This commit is contained in:
parent
d3cbd05b1b
commit
2f0304f9f1
Binary file not shown.
@ -81,7 +81,7 @@ public class AwakenedArtifact {
|
|||||||
item = addAP(item,1);
|
item = addAP(item,1);
|
||||||
double potentialred = 10.0d;
|
double potentialred = 10.0d;
|
||||||
potentialred/=1+(ArtifactAbility.calculateValue(ArtifactAbility.PRESERVATION, artifact.getEnchantmentLevel(Enchantment.LUCK), ArtifactAbility.getEnchantmentLevel(ArtifactAbility.PRESERVATION, artifact))/100d);
|
potentialred/=1+(ArtifactAbility.calculateValue(ArtifactAbility.PRESERVATION, artifact.getEnchantmentLevel(Enchantment.LUCK), ArtifactAbility.getEnchantmentLevel(ArtifactAbility.PRESERVATION, artifact))/100d);
|
||||||
TwosideKeeper.log("Potential reduction is reduced by "+(10-potentialred), 2);
|
TwosideKeeper.log("Potential reduction is reduced by "+(10-potentialred), 4);
|
||||||
if (ArtifactAbility.containsEnchantment(ArtifactAbility.GREED, item)) {
|
if (ArtifactAbility.containsEnchantment(ArtifactAbility.GREED, item)) {
|
||||||
if (ArtifactAbility.getEnchantmentLevel(ArtifactAbility.GREED, item)>1) {
|
if (ArtifactAbility.getEnchantmentLevel(ArtifactAbility.GREED, item)>1) {
|
||||||
item = ArtifactAbility.applyEnchantment(ArtifactAbility.GREED, ArtifactAbility.getEnchantmentLevel(ArtifactAbility.GREED, item)-1, item);
|
item = ArtifactAbility.applyEnchantment(ArtifactAbility.GREED, ArtifactAbility.getEnchantmentLevel(ArtifactAbility.GREED, item)-1, item);
|
||||||
|
@ -1955,7 +1955,7 @@ public class GenericFunctions {
|
|||||||
+ ChatColor.GRAY+"- Close Range Mode (Default): \n"
|
+ ChatColor.GRAY+"- Close Range Mode (Default): \n"
|
||||||
+ ChatColor.WHITE+" You gain the ability to deal headshots from any distance, even directly onto an enemy's face. (Old headshot behavior)\n"
|
+ ChatColor.WHITE+" You gain the ability to deal headshots from any distance, even directly onto an enemy's face. (Old headshot behavior)\n"
|
||||||
+ ChatColor.GRAY+"- Sniping Mode: \n"
|
+ ChatColor.GRAY+"- Sniping Mode: \n"
|
||||||
+ ChatColor.WHITE+" Headshot collision area increases by x3. Headshots deal x4 damage, but you also have Slowness VI while in this mode.\n"
|
+ ChatColor.WHITE+" Headshot collision area increases by x3. Headshots will deal an extra x0.25 damage for each headshot landed, up to a cap of 8 stacks. Each stack also increases your Slowness level by 1.\n"
|
||||||
+ ChatColor.GRAY+"- Debilitation Mode:\n"
|
+ ChatColor.GRAY+"- Debilitation Mode:\n"
|
||||||
+ ChatColor.WHITE+" Adds a stack of Poison when hitting non-poisoned targets (20 second duration). Hitting mobs in this mode refreshes the duration of the poison stacks. Headshots made in this mode will increase the level of Poison on the mob, making the mob more and more vulnerable.\n"
|
+ ChatColor.WHITE+" Adds a stack of Poison when hitting non-poisoned targets (20 second duration). Hitting mobs in this mode refreshes the duration of the poison stacks. Headshots made in this mode will increase the level of Poison on the mob, making the mob more and more vulnerable.\n"
|
||||||
;
|
;
|
||||||
|
@ -998,7 +998,7 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
|
|||||||
p.spigot().sendMessage(ArtifactAbility.GenerateMenu(ArtifactItemType.getArtifactItemTypeFromItemStack(p.getInventory().getArmorContents()[Integer.parseInt(args[1])-900]).getUpgradePath(), CalculateDamageReduction(1,p,p), p.getInventory().getArmorContents()[Integer.parseInt(args[1])-900],Integer.parseInt(args[1])));
|
p.spigot().sendMessage(ArtifactAbility.GenerateMenu(ArtifactItemType.getArtifactItemTypeFromItemStack(p.getInventory().getArmorContents()[Integer.parseInt(args[1])-900]).getUpgradePath(), CalculateDamageReduction(1,p,p), p.getInventory().getArmorContents()[Integer.parseInt(args[1])-900],Integer.parseInt(args[1])));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (p.getEquipment().getItemInMainHand()!=null) {
|
if (p.getEquipment().getItemInMainHand()!=null && GenericFunctions.isArtifactEquip(p.getEquipment().getItemInMainHand())) {
|
||||||
p.spigot().sendMessage(ArtifactAbility.GenerateMenu(ArtifactItemType.getArtifactItemTypeFromItemStack(p.getEquipment().getItemInMainHand()).getUpgradePath(), CalculateDamageReduction(1,p,p), p.getEquipment().getItemInMainHand()));
|
p.spigot().sendMessage(ArtifactAbility.GenerateMenu(ArtifactItemType.getArtifactItemTypeFromItemStack(p.getEquipment().getItemInMainHand()).getUpgradePath(), CalculateDamageReduction(1,p,p), p.getEquipment().getItemInMainHand()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -4158,7 +4158,7 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
|
|||||||
headshotvaly*=mult;
|
headshotvaly*=mult;
|
||||||
headshotvalz*=mult;
|
headshotvalz*=mult;
|
||||||
|
|
||||||
log("Headshot hitbox size Multiplier: x"+mult,2);
|
log("Headshot hitbox size Multiplier: x"+mult,4);
|
||||||
log(headshotvalx+","+headshotvaly+","+headshotvalz,5);
|
log(headshotvalx+","+headshotvaly+","+headshotvalz,5);
|
||||||
|
|
||||||
if (ev.getDamager().getTicksLived()>=4 || GenericFunctions.isRanger(p)) {
|
if (ev.getDamager().getTicksLived()>=4 || GenericFunctions.isRanger(p)) {
|
||||||
@ -4175,7 +4175,7 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
|
|||||||
for (int i1=0;i1<p.getActivePotionEffects().size();i1++) {
|
for (int i1=0;i1<p.getActivePotionEffects().size();i1++) {
|
||||||
if (Iterables.get(p.getActivePotionEffects(), i1).getType().equals(PotionEffectType.SLOW)) {
|
if (Iterables.get(p.getActivePotionEffects(), i1).getType().equals(PotionEffectType.SLOW)) {
|
||||||
int lv = Iterables.get(p.getActivePotionEffects(), i1).getAmplifier();
|
int lv = Iterables.get(p.getActivePotionEffects(), i1).getAmplifier();
|
||||||
log("New Slowness level: "+lv,2);
|
log("New Slowness level: "+lv,5);
|
||||||
p.removePotionEffect(PotionEffectType.SLOW);
|
p.removePotionEffect(PotionEffectType.SLOW);
|
||||||
p.addPotionEffect(new PotionEffect(PotionEffectType.SLOW,99,lv+1));
|
p.addPotionEffect(new PotionEffect(PotionEffectType.SLOW,99,lv+1));
|
||||||
break;
|
break;
|
||||||
@ -4931,6 +4931,22 @@ public class TwosideKeeper extends JavaPlugin implements Listener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@EventHandler(priority=EventPriority.LOW,ignoreCancelled = true)
|
||||||
|
public void onArrowLand(ProjectileHitEvent ev) {
|
||||||
|
if (ev.getEntity() instanceof Arrow) {
|
||||||
|
Arrow ar = (Arrow)ev.getEntity();
|
||||||
|
if (ar.getShooter()!=null &&
|
||||||
|
(ar.getShooter() instanceof Player)) {
|
||||||
|
Player p = (Player)ar.getShooter();
|
||||||
|
if (GenericFunctions.isRanger(p)
|
||||||
|
&& GenericFunctions.getBowMode(p.getEquipment().getItemInMainHand())==BowMode.SNIPE) {
|
||||||
|
//This arrow was shot from a sniper.
|
||||||
|
aPlugin.API.sendSoundlessExplosion(ar.getLocation(), 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@EventHandler(priority=EventPriority.LOW,ignoreCancelled = true)
|
@EventHandler(priority=EventPriority.LOW,ignoreCancelled = true)
|
||||||
public void onArrowShot(EntityShootBowEvent ev) {
|
public void onArrowShot(EntityShootBowEvent ev) {
|
||||||
//Check if it's a player.
|
//Check if it's a player.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user