Fix more GI issues

This commit is contained in:
Sam 2018-01-31 18:00:49 +00:00 committed by Alexander Meech
parent 125b99a04b
commit c76a8390fc
4 changed files with 18 additions and 27 deletions

View File

@ -80,10 +80,10 @@ public class KitSpider extends SmashKit
};
private static final ItemStack[] PLAYER_ARMOR = {
ItemStackFactory.Instance.CreateStack(Material.IRON_BOOTS),
null,
ItemStackFactory.Instance.CreateStack(Material.CHAINMAIL_BOOTS),
ItemStackFactory.Instance.CreateStack(Material.CHAINMAIL_LEGGINGS),
ItemStackFactory.Instance.CreateStack(Material.CHAINMAIL_CHESTPLATE),
ItemStackFactory.Instance.CreateStack(Material.CHAINMAIL_HELMET),
null,
};
public KitSpider(ArcadeManager manager)

View File

@ -139,7 +139,7 @@ public class PerkCreeperSulphurBomb extends SmashPerk
Item ent = player.getWorld().dropItem(player.getEyeLocation(), ItemStackFactory.Instance.CreateStack(Material.COAL, (byte) 0));
UtilAction.velocity(ent, player.getLocation().getDirection(), 1.2, false, 0, 0.2, 10, false);
Manager.GetProjectile().AddThrow(ent, player, _sulphurThrown, -1, true, true, true, true, null, 1f, 1f, null, 1, UpdateType.SLOW, 1);
Manager.GetProjectile().AddThrow(ent, player, _sulphurThrown, -1, true, true, true, true, null, 1f, 1f, null, 1, UpdateType.SLOW, 0.8F);
// Inform
UtilPlayer.message(player, F.main("Game", "You used " + F.skill(GetName()) + "."));

View File

@ -2,7 +2,6 @@ package nautilus.game.arcade.game.games.smash.perks.magmacube;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import net.minecraft.server.v1_8_R3.EntityLargeFireball;
@ -50,7 +49,7 @@ public class PerkMagmaBlast extends Perk
private int _fireRadius;
private int _damage;
private Map<LargeFireball, Location> _proj = new HashMap<>();
private final Map<LargeFireball, Location> _proj = new HashMap<>();
public PerkMagmaBlast()
{
@ -151,7 +150,6 @@ public class PerkMagmaBlast extends Perk
{
projIterator.remove();
proj.remove();
continue;
}
}
}
@ -180,34 +178,27 @@ public class PerkMagmaBlast extends Perk
Player shooter = (Player) proj.getShooter();
// Velocity Players
Map<Player, Double> hitMap = UtilPlayer.getInRadius(proj.getLocation(), _velocityRadius);
Map<Player, Double> hitMap = UtilPlayer.getInRadius(proj.getLocation().subtract(0, 1, 0), _velocityRadius);
List<Player> team = TeamSuperSmash.getTeam(Manager, shooter, false);
for (Player cur : hitMap.keySet())
hitMap.forEach((player, range) ->
{
if(team.contains(cur))
{
continue;
}
double range = hitMap.get(cur);
if (range > 0.8)
{
range = 1;
range = 1D;
}
Manager.GetDamage().NewDamageEvent(cur, shooter, proj, DamageCause.PROJECTILE, range * _damage, false, true, false, shooter.getName(), GetName());
Manager.GetDamage().NewDamageEvent(player, shooter, proj, DamageCause.PROJECTILE, range * _damage, false, true, false, shooter.getName(), GetName());
// Velocity
UtilAction.velocity(cur, UtilAlg.getTrajectory(proj.getLocation().add(0, -0.5, 0), cur.getEyeLocation()), 1 + 2 * range, false, 0, 0.2 + 0.4 * range, 1.2, true);
}
UtilAction.velocity(player, UtilAlg.getTrajectory(proj.getLocation().add(0, -0.5, 0), player.getEyeLocation()), 1 + 2 * range, false, 0, 0.2 + 0.4 * range, 1.2, true);
});
// Particles
UtilParticle.PlayParticleToAll(ParticleType.LAVA, proj.getLocation(), 0.1f, 0.1f, 0.1f, 0.1f, 50, ViewDist.LONG);
}
@EventHandler
//TODO REMOVE METHOD IF FIRE GONE DONT FORGET
//@EventHandler
public void damage(CustomDamageEvent event)
{
if (event.GetProjectile() == null || event.GetDamageeEntity() == null)

View File

@ -47,7 +47,7 @@ public class PerkLazer extends Perk
private long _recharge;
private float _chargePerTick;
private float _hitBoxRadius;
private int _damageRadius;
private float _damageRadius;
private int _damage;
private float _knockbackMagnitude;
private double _range;
@ -65,7 +65,7 @@ public class PerkLazer extends Perk
_recharge = getPerkTime("Cooldown");
_chargePerTick = getPerkFloat("Charge Per Tick");
_hitBoxRadius = getPerkFloat("Hit Box Radius");
_damageRadius = getPerkInt("Damage Radius");
_damageRadius = getPerkFloat("Damage Radius");
_damage = getPerkInt("Damage");
_knockbackMagnitude = getPerkFloat("Knockback Magnitude");
_range = getPerkInt("Range");