EVEN MORE GI CHANGES

This commit is contained in:
Sam 2018-01-31 19:40:22 +00:00 committed by Alexander Meech
parent c76a8390fc
commit a76d83cd69
6 changed files with 43 additions and 28 deletions

View File

@ -78,7 +78,7 @@ public class PerkFlap extends SmashPerk
}
else
{
UtilAction.velocity(player, player.getLocation().getDirection(), power, true, power, 0, 10, true);
UtilAction.velocity(player, player.getLocation().getDirection(), power, true, power, 0.3, 10, true);
}
// Sound

View File

@ -113,14 +113,14 @@ public class PerkCowMilkSpiral extends SmashPerk
for (Player player : Manager.GetGame().GetPlayers(true))
{
if (player.equals(data.Player) || !Recharge.Instance.use(player, GetName() + " Rate", 500, false, false))
if (player.equals(data.Player) || !Recharge.Instance.use(player, GetName() + " Rate", 250, false, false))
{
continue;
}
if (UtilMath.offset(player.getLocation().add(0, 1.5, 0), data.Spiral) < _hitBoxRadius)
{
Manager.GetDamage().NewDamageEvent(player, data.Player, null, DamageCause.CUSTOM, _damage, true, false, false, player.getName(), GetName());
Manager.GetDamage().NewDamageEvent(player, data.Player, null, DamageCause.CUSTOM, _damage, true, true, false, player.getName(), GetName());
UtilParticle.PlayParticleToAll(isSuperActive(player) ? ParticleType.RED_DUST : ParticleType.FIREWORKS_SPARK, player.getLocation().add(0, 1, 0), 0.2f, 0.2f, 0.2f, 0.3f, 30, ViewDist.LONG);
player.getWorld().playSound(player.getLocation(), Sound.SPLASH, 0.25f, 2f);

View File

@ -36,6 +36,7 @@ public class PerkCreeperSulphurBomb extends SmashPerk
private int _cooldown;
private float _damage;
private float _knockbackMagnitude;
private float _hitBox;
private final IThrown _sulphurThrown = new IThrown()
{
@ -90,6 +91,7 @@ public class PerkCreeperSulphurBomb extends SmashPerk
_cooldown = getPerkTime("Cooldown");
_damage = getPerkFloat("Damage");
_knockbackMagnitude = getPerkFloat("Knockback Magnitude");
_hitBox = getPerkFloat("Hit Box");
}
@EventHandler
@ -139,7 +141,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, 0.8F);
Manager.GetProjectile().AddThrow(ent, player, _sulphurThrown, -1, true, true, true, true, null, 1f, 1f, null, 1, UpdateType.SLOW, _hitBox);
// Inform
UtilPlayer.message(player, F.main("Game", "You used " + F.skill(GetName()) + "."));

View File

@ -39,7 +39,7 @@ public class PerkSonicBoom extends SmashPerk
{
super("Sonic Hurr", new String[]
{
C.cYellow + "Right-Click" + C.cGray + " Axe to use" + C.cGreen + "Sonic Hurr",
C.cYellow + "Right-Click" + C.cGray + " Axe to use " + C.cGreen + "Sonic Hurr",
});
}

View File

@ -56,7 +56,7 @@ public class PerkVillagerShot extends SmashPerk implements IThrown
{
super("Trade Scatter", new String[]
{
C.cYellow + "Right-Click" + C.cGray + " Hoe to use" + C.cGreen + "Trade Scatter",
C.cYellow + "Right-Click" + C.cGray + " Hoe to use " + C.cGreen + "Trade Scatter",
});
_items = new HashMap<>();

View File

@ -1,17 +1,15 @@
package nautilus.game.arcade.game.modules.chest;
import mineplex.core.common.util.MapUtil;
import mineplex.core.common.util.UtilAlg;
import mineplex.core.common.util.UtilBlock;
import mineplex.core.common.util.UtilEvent;
import mineplex.core.common.util.UtilEvent.ActionType;
import mineplex.core.common.util.UtilMath;
import mineplex.core.common.util.UtilTime;
import mineplex.core.updater.UpdateType;
import mineplex.core.updater.event.UpdateEvent;
import nautilus.game.arcade.events.GameStateChangeEvent;
import nautilus.game.arcade.game.Game.GameState;
import nautilus.game.arcade.game.modules.Module;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import java.util.concurrent.TimeUnit;
import org.bukkit.Effect;
import org.bukkit.Location;
import org.bukkit.Material;
@ -24,15 +22,22 @@ import org.bukkit.event.EventPriority;
import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.inventory.ItemStack;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import java.util.concurrent.TimeUnit;
import mineplex.core.common.util.MapUtil;
import mineplex.core.common.util.UtilAlg;
import mineplex.core.common.util.UtilBlock;
import mineplex.core.common.util.UtilEvent;
import mineplex.core.common.util.UtilEvent.ActionType;
import mineplex.core.common.util.UtilMath;
import mineplex.core.common.util.UtilTime;
import mineplex.core.titles.tracks.standard.LuckyTrack;
import mineplex.core.titles.tracks.standard.UnluckyTrack;
import mineplex.core.updater.UpdateType;
import mineplex.core.updater.event.UpdateEvent;
import nautilus.game.arcade.ArcadeManager;
import nautilus.game.arcade.events.GameStateChangeEvent;
import nautilus.game.arcade.game.Game.GameState;
import nautilus.game.arcade.game.modules.Module;
public class ChestLootModule extends Module
{
@ -214,15 +219,23 @@ public class ChestLootModule extends Module
return;
}
Chest chest = (Chest) block.getState();
Player player = event.getPlayer();
ArcadeManager manager = getGame().getArcadeManager();
getGame().AddStat(player, "ChestsOpened", 1, false, false);
if (manager.IsRewardStats())
{
manager.getTrackManager().getTrack(LuckyTrack.class).handleLoot(player, chest.getBlockInventory());
manager.getTrackManager().getTrack(UnluckyTrack.class).handleLoot(player, chest.getBlockInventory());
}
metadata.Opened = true;
metadata.OpenedAt = System.currentTimeMillis();
if (!_preGenerateLoot)
{
metadata.populateChest((Chest) block.getState());
metadata.populateChest(chest);
}
}