Correct damage for Fireball and AnvilDrop

This issue came down to two bugs with the explosions created
by Fireball and AnvilDrop.

The first was the damage being done.  Settings the max damage
doesn't change the base damage, so they did the default amount
of damage based on the vanilla code.

The second was the radius of the explosion.  The radius was
too small, and so it was perceived that only users directly hit
would suffer damage.  The radius was increased, however the block
explosion size was kept the same.
This commit is contained in:
Nate Mortensen 2016-11-16 13:36:07 -07:00 committed by cnr
parent 833c52d0f2
commit fb15264a69
3 changed files with 6 additions and 6 deletions

View File

@ -252,7 +252,6 @@ public class CustomExplosion extends Explosion
continue;
double d7 = entity.f(this.posX, this.posY, this.posZ) / this._size; // XXX
if (d7 <= 1.0D)
{
double d0 = entity.locX - this.posX;

View File

@ -90,7 +90,7 @@ public class SpellAnvilDrop extends Spell implements SpellClick
int spellLevel = entity.getMetadata("SpellLevel").get(0).asInt();
CustomExplosion explosion = new CustomExplosion(Wizards.getArcadeManager().GetDamage(), Wizards.getArcadeManager()
.GetExplosion(), entity.getLocation(), 1 + (spellLevel / 2F), "Anvil Drop");
.GetExplosion(), entity.getLocation(), 4 + (spellLevel / 2F), "Anvil Drop");
explosion.setPlayer((Player) entity.getMetadata("Wizard").get(0).value(), true);
@ -98,7 +98,8 @@ public class SpellAnvilDrop extends Spell implements SpellClick
explosion.setDropItems(false);
explosion.setMaxDamage(6 + (spellLevel * 4));
explosion.setBlockExplosionSize(explosion.getSize() -3);
explosion.setExplosionDamage(3 + (spellLevel * 2));
explosion.explode();

View File

@ -32,17 +32,17 @@ public class SpellFireball extends Spell implements SpellClick
int spellLevel = projectile.getMetadata("SpellLevel").get(0).asInt();
CustomExplosion explosion = new CustomExplosion(Wizards.getArcadeManager().GetDamage(), Wizards.getArcadeManager()
.GetExplosion(), projectile.getLocation(), (spellLevel * 0.3F) + 1F, "Fireball");
.GetExplosion(), projectile.getLocation(), (spellLevel * 0.3F) + 4F, "Fireball");
explosion.setPlayer((Player) projectile.getMetadata("FireballSpell").get(0).value(), true);
explosion.setFallingBlockExplosion(true);
explosion.setBlockExplosionSize(explosion.getSize() + 1);
explosion.setBlockExplosionSize(explosion.getSize() - 2);
explosion.setDropItems(false);
explosion.setMaxDamage(spellLevel + 6);
explosion.setExplosionDamage(spellLevel + 6);
explosion.explode();
}