Milk The Cow:
New Gameplay Feature - When a cow charges a farmer, any milk in their bucket will be lost New Perk - Steady Hands: - Lowers the amount of milk lost by a dead player to 3 - Removes losing milk in farmer's bucket when a cow charges into them New Kit - Sturdy Farmhand: - Iron skin damage reduction of 2.0 - Implements Steady Hands perk - 2000 gems
This commit is contained in:
parent
eb16cd755a
commit
b53b98d6e3
@ -4,6 +4,33 @@ import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
|
||||
import mineplex.core.common.util.F;
|
||||
import mineplex.core.common.util.UtilAlg;
|
||||
import mineplex.core.common.util.UtilGear;
|
||||
import mineplex.core.common.util.UtilInv;
|
||||
import mineplex.core.common.util.UtilMath;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.UtilTime;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
import mineplex.core.visibility.VisibilityManager;
|
||||
import mineplex.minecraft.game.core.combat.event.CombatDeathEvent;
|
||||
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
||||
import nautilus.game.arcade.ArcadeManager;
|
||||
import nautilus.game.arcade.GameType;
|
||||
import nautilus.game.arcade.events.GameStateChangeEvent;
|
||||
import nautilus.game.arcade.game.GameTeam;
|
||||
import nautilus.game.arcade.game.GameTeam.PlayerState;
|
||||
import nautilus.game.arcade.game.SoloGame;
|
||||
import nautilus.game.arcade.game.games.milkcow.MilkRemoveEvent.RemoveType;
|
||||
import nautilus.game.arcade.game.games.milkcow.kits.KitCow;
|
||||
import nautilus.game.arcade.game.games.milkcow.kits.KitFarmerJump;
|
||||
import nautilus.game.arcade.game.games.milkcow.kits.KitSturdyFarmhand;
|
||||
import nautilus.game.arcade.kit.Kit;
|
||||
import nautilus.game.arcade.kit.NullKit;
|
||||
import net.minecraft.server.v1_7_R4.EntityCreature;
|
||||
import net.minecraft.server.v1_7_R4.Navigation;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Location;
|
||||
@ -25,31 +52,6 @@ import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.scoreboard.DisplaySlot;
|
||||
import org.bukkit.scoreboard.Objective;
|
||||
|
||||
import mineplex.core.common.util.F;
|
||||
import mineplex.core.common.util.UtilAlg;
|
||||
import mineplex.core.common.util.UtilGear;
|
||||
import mineplex.core.common.util.UtilInv;
|
||||
import mineplex.core.common.util.UtilMath;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.common.util.UtilTime;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
import mineplex.core.visibility.VisibilityManager;
|
||||
import mineplex.minecraft.game.core.combat.event.CombatDeathEvent;
|
||||
import mineplex.minecraft.game.core.damage.CustomDamageEvent;
|
||||
import nautilus.game.arcade.ArcadeManager;
|
||||
import nautilus.game.arcade.GameType;
|
||||
import nautilus.game.arcade.events.GameStateChangeEvent;
|
||||
import nautilus.game.arcade.game.GameTeam;
|
||||
import nautilus.game.arcade.game.SoloGame;
|
||||
import nautilus.game.arcade.game.GameTeam.PlayerState;
|
||||
import nautilus.game.arcade.game.games.milkcow.kits.*;
|
||||
import nautilus.game.arcade.kit.Kit;
|
||||
import nautilus.game.arcade.kit.NullKit;
|
||||
import net.minecraft.server.v1_7_R4.EntityCreature;
|
||||
import net.minecraft.server.v1_7_R4.Navigation;
|
||||
|
||||
public class MilkCow extends SoloGame
|
||||
{
|
||||
private GameTeam _farmers;
|
||||
@ -73,6 +75,7 @@ public class MilkCow extends SoloGame
|
||||
new Kit[]
|
||||
{
|
||||
new KitFarmerJump(manager),
|
||||
new KitSturdyFarmhand(manager),
|
||||
new NullKit(manager),
|
||||
new KitCow(manager),
|
||||
},
|
||||
@ -112,7 +115,7 @@ public class MilkCow extends SoloGame
|
||||
{
|
||||
if (team.GetColor() == ChatColor.RED)
|
||||
{
|
||||
if (kit.GetName().contains("Farmer"))
|
||||
if (kit.GetName().contains("Farm"))
|
||||
team.GetRestrictedKits().add(kit);
|
||||
}
|
||||
else
|
||||
@ -288,7 +291,7 @@ public class MilkCow extends SoloGame
|
||||
SetPlayerTeam(player, _cows, true);
|
||||
|
||||
//Kit
|
||||
Kit newKit = GetKits()[2];
|
||||
Kit newKit = GetKits()[3];
|
||||
|
||||
SetKit(player, newKit, false);
|
||||
newKit.ApplyKit(player);
|
||||
@ -345,7 +348,9 @@ public class MilkCow extends SoloGame
|
||||
@EventHandler
|
||||
public void LoseMilk(PlayerDeathEvent event)
|
||||
{
|
||||
SetScore(event.getEntity(), Math.max(0, GetScore(event.getEntity()) - 5));
|
||||
MilkRemoveEvent e = new MilkRemoveEvent(event.getEntity(), 5, RemoveType.DEATH);
|
||||
Bukkit.getPluginManager().callEvent(e);
|
||||
SetScore(event.getEntity(), Math.max(0, GetScore(event.getEntity()) - e.GetMilk()));
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
|
@ -33,7 +33,7 @@ public class KitCow extends AbbreviatedKit
|
||||
new PerkKnockbackMultiplier(4),
|
||||
new PerkCharge(),
|
||||
new PerkCowBomb(),
|
||||
new PerkSeismicCow(),
|
||||
new PerkSeismicCow("Body Slam"),
|
||||
},
|
||||
EntityType.COW,
|
||||
null);
|
||||
@ -67,7 +67,7 @@ public class KitCow extends AbbreviatedKit
|
||||
new String[]
|
||||
{
|
||||
ChatColor.RESET + "Charge with great power, flinging",
|
||||
ChatColor.RESET + "filthy farmers out of your way!",
|
||||
ChatColor.RESET + "filthy farmers out of your way, making them drop the milk in their buckets!",
|
||||
}));
|
||||
|
||||
//Disguise
|
||||
|
@ -2,23 +2,29 @@ package nautilus.game.arcade.kit.perks;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.UtilAction;
|
||||
import mineplex.core.common.util.UtilAlg;
|
||||
import mineplex.core.common.util.UtilEnt;
|
||||
import mineplex.core.common.util.UtilInv;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
import nautilus.game.arcade.game.games.milkcow.MilkRemoveEvent;
|
||||
import nautilus.game.arcade.game.games.milkcow.MilkRemoveEvent.RemoveType;
|
||||
import nautilus.game.arcade.kit.Perk;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Sound;
|
||||
import org.bukkit.entity.Cow;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.entity.EntityDamageEvent.DamageCause;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.UtilAction;
|
||||
import mineplex.core.common.util.UtilAlg;
|
||||
import mineplex.core.common.util.UtilEnt;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import nautilus.game.arcade.kit.Perk;
|
||||
|
||||
public class PerkCharge extends Perk
|
||||
{
|
||||
public PerkCharge()
|
||||
@ -74,6 +80,19 @@ public class PerkCharge extends Perk
|
||||
|
||||
//Sound
|
||||
player.getWorld().playSound(player.getLocation(), Sound.ZOMBIE_WOOD, 0.75f, 1f);
|
||||
|
||||
if (cur instanceof Player)
|
||||
{
|
||||
MilkRemoveEvent e = new MilkRemoveEvent((Player)cur, 1, RemoveType.FLING);
|
||||
Bukkit.getPluginManager().callEvent(e);
|
||||
ItemStack bucket = e.GetPlayer().getInventory().getItem(0);
|
||||
if ((bucket.getType() == Material.MILK_BUCKET) && e.GetMilk() >= 0)
|
||||
{
|
||||
bucket.setType(Material.BUCKET);
|
||||
e.GetPlayer().getInventory().setItem(0, bucket);
|
||||
}
|
||||
UtilInv.Update(e.GetPlayer());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -32,6 +32,14 @@ public class PerkSeismicCow extends Perk
|
||||
{
|
||||
private HashMap<LivingEntity, Long> _live = new HashMap<LivingEntity, Long>();
|
||||
|
||||
public PerkSeismicCow(String displayName)
|
||||
{
|
||||
super(displayName, new String[]
|
||||
{
|
||||
C.cYellow + "Right-Click" + C.cGray + " with Shovel to " + C.cGreen + "Seismic Slam"
|
||||
});
|
||||
}
|
||||
|
||||
public PerkSeismicCow()
|
||||
{
|
||||
super("Seismic Slam", new String[]
|
||||
|
Loading…
Reference in New Issue
Block a user