Fix explosion calculation with blast protection accounted for.

This commit is contained in:
sigonasr2 2016-07-26 06:16:08 -05:00
parent e53faf0928
commit 6c620fc599
3 changed files with 2 additions and 2 deletions

Binary file not shown.

View File

@ -1,6 +1,6 @@
name: TwosideKeeper name: TwosideKeeper
main: sig.plugin.TwosideKeeper.TwosideKeeper main: sig.plugin.TwosideKeeper.TwosideKeeper
version: 3.7.0ar1 version: 3.7.0a2
commands: commands:
money: money:
description: Tells the player the amount of money they are holding. description: Tells the player the amount of money they are holding.

View File

@ -167,7 +167,7 @@ public class NewCombat {
case LIGHTNING: case LIGHTNING:
if (damager instanceof Creeper) { if (damager instanceof Creeper) {
Creeper c = (Creeper)damager; Creeper c = (Creeper)damager;
double damage_mult = 2.0d/c.getLocation().distance(target.getLocation()); double damage_mult = 2.0d/(c.getLocation().distance(target.getLocation())+1.0);
damage_mult*=TwosideKeeper.EXPLOSION_DMG_MULT; damage_mult*=TwosideKeeper.EXPLOSION_DMG_MULT;
difficulty_damage = (c.isPowered())?new double[]{48.0*damage_mult,72.0*damage_mult,98.0*damage_mult}:new double[]{24.0*damage_mult,36.0*damage_mult,49.0*damage_mult}; difficulty_damage = (c.isPowered())?new double[]{48.0*damage_mult,72.0*damage_mult,98.0*damage_mult}:new double[]{24.0*damage_mult,36.0*damage_mult,49.0*damage_mult};
} else { } else {