From 2ab1b51401ded8d8f1ae8666c2198071ac6ba08c Mon Sep 17 00:00:00 2001 From: Cheese Date: Sun, 7 Feb 2016 14:09:02 +1100 Subject: [PATCH] bug fixes --- .../arcade/game/games/valentines/ValItem.java | 16 +++++++-------- .../game/games/valentines/Valentines.java | 20 ++++++++++--------- .../tutorial/TutorialPhaseValentines.java | 2 +- .../tutorial/TutorialValentines.java | 6 +++--- .../arcade/gametutorial/TutorialText.java | 6 +++--- 5 files changed, 25 insertions(+), 25 deletions(-) diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/valentines/ValItem.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/valentines/ValItem.java index bb38e5317..6dc6e4bd0 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/valentines/ValItem.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/valentines/ValItem.java @@ -38,15 +38,8 @@ public enum ValItem WATCH("Fancy Pocket Watch", "This Moolex Watch sure looks good on me!", - Material.WATCH, 0), - - LEASH("Checkered Neck Tie", - "Phew, you found my tie! This restaurant is fancy!", - Material.LEASH, 0), - - SADDLE("Saddle", - "Oh, uh... that's for later.", - Material.LEASH, 0); + Material.WATCH, 0); + private String _title; private String _endText; @@ -75,4 +68,9 @@ public enum ValItem { return _endText; } + + public byte getData() + { + return _itemByte; + } } diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/valentines/Valentines.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/valentines/Valentines.java index b2ac18fcf..cc15a91d6 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/valentines/Valentines.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/valentines/Valentines.java @@ -193,7 +193,7 @@ public class Valentines extends SoloGame @EventHandler public void knockbackRod(EntityDamageEvent event) { - if (!(event.getEntity() instanceof LivingEntity)) + if (!(event.getEntity() instanceof Player)) return; Projectile projectile = Manager.GetDamage().GetProjectile(event); @@ -208,7 +208,9 @@ public class Valentines extends SoloGame damagee.playEffect(EntityEffect.HURT); - UtilAction.velocity(damagee, UtilAlg.getTrajectory(damagee, damager), 0.6, false, 0, 0.2, 1, true); + UtilAction.velocity(damagee, UtilAlg.getTrajectory(damagee, damager), 0.2, false, 0, 0.1, 1, true); + + projectile.remove(); } @EventHandler @@ -252,8 +254,9 @@ public class Valentines extends SoloGame _pigs.remove(pig); - pig.playEffect(EntityEffect.DEATH); - _pigsDead.add(pig); + pig.damage(9999); +// pig.playEffect(EntityEffect.DEATH); +// _pigsDead.add(pig); //Remove Item from Pig if (pig.getPassenger() != null) @@ -404,7 +407,7 @@ public class Valentines extends SoloGame //Give Item if (toSpawn > 1) { - Item item = pig.getWorld().dropItem(pig.getLocation(), new ItemStack(_item.getMaterial())); + Item item = pig.getWorld().dropItem(pig.getLocation(),ItemStackFactory.Instance.CreateStack(_item.getMaterial(), _item.getData())); if (pig.getPassenger() != null) pig.getPassenger().remove(); @@ -431,7 +434,7 @@ public class Valentines extends SoloGame { UtilAction.velocity(pig, UtilAlg.getTrajectory(pig.getLocation(), - GetSpectatorLocation().add(Math.random() * 30 - 15, 0, Math.random() * 30 - 15)), + GetSpectatorLocation().clone().add(Math.random() * 30 - 15, 0, Math.random() * 30 - 15)), 2 + Math.random(), false, 0, 0.4, 10, true); pig.getWorld().playSound(pig.getLocation(), Sound.PIG_IDLE, 2f, 2f); @@ -522,14 +525,14 @@ public class Valentines extends SoloGame UtilAction.velocity(pig, UtilAlg.getTrajectory(pig.getLocation(), - GetSpectatorLocation().add(Math.random() * 30 - 15, 0, Math.random() * 30 - 15)), + GetSpectatorLocation().clone().add(Math.random() * 30 - 15, 0, Math.random() * 30 - 15)), 2 + Math.random(), false, 0, 0.4, 10, true); pig.getWorld().playSound(pig.getLocation(), Sound.PIG_IDLE, 2f, 2f); } } - UtilEnt.CreatureMoveFast(pig, target, 1.5f + (float)(1f * closestDist)); + UtilEnt.CreatureMoveFast(pig, target, (_finalRound ? 0.4f : 0f) + 1.5f + (float)(1f * closestDist)); } } @@ -614,7 +617,6 @@ public class Valentines extends SoloGame if (pig.getPassenger() != null) pig.getPassenger().remove(); - pig.playEffect(EntityEffect.DEATH); _pigsDead.add(pig); pigIter.remove(); } diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/valentines/tutorial/TutorialPhaseValentines.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/valentines/tutorial/TutorialPhaseValentines.java index 2548c9284..923fe4947 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/valentines/tutorial/TutorialPhaseValentines.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/valentines/tutorial/TutorialPhaseValentines.java @@ -17,7 +17,7 @@ public class TutorialPhaseValentines extends TutorialPhase new TutorialText(C.cGreen + "Calvin", "Of course not!!!", 2, Sound.COW_IDLE), new TutorialText(C.cGreen + "Calvin", "I promise this year will be amazing!", 3, Sound.COW_IDLE), new TutorialText(C.cRed + "Moolanie", "It better be, or we're finished...", 4, Sound.COW_IDLE), - new TutorialText(C.cGreen + "Calvin", "Good thing I prepared for this!", 5, Sound.COW_IDLE), + new TutorialText(C.cGreen + "Calvin", "Good thing I prepared this year!", 5, Sound.COW_IDLE), new TutorialText(C.cGreen + "Calvin", "WHAT?!", 6, Sound.COW_IDLE), new TutorialText(C.cGreen + "Calvin", "NO!!", 7, Sound.COW_IDLE), new TutorialText(C.cGreen + "Calvin", "SOMEBODY HELP ME!", 8, Sound.COW_IDLE), diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/valentines/tutorial/TutorialValentines.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/valentines/tutorial/TutorialValentines.java index cb0831bcf..386bc5fe1 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/valentines/tutorial/TutorialValentines.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/game/games/valentines/tutorial/TutorialValentines.java @@ -104,7 +104,7 @@ public class TutorialValentines extends GameTutorial if (getCurrentPhase().getCurrentText().ID() > 5) { //Spawn - if (_pigs.size() < 5 && tick % 20 == 0) + if (_pigs.size() < 5 && tick % 15 == 0) { Host.CreatureAllowOverride = true; @@ -215,9 +215,9 @@ public class TutorialValentines extends GameTutorial for (Player player : getPlayers().keySet()) { - Host.Manager.GetCondition().Factory().Blind("Tutorial End", player, player, 2, 0, false, false, false); + Host.Manager.GetCondition().Factory().Blind("Tutorial End", player, player, 4, 0, false, false, false); } - UtilTextMiddle.display(C.cGreenB + "Calvin", "Get my things back from the pigs!", 0, 80, 20, UtilServer.getPlayers()); + UtilTextMiddle.display(C.cGreenB + "Calvin", "Punch the Pigs to get my items back!", 0, 100, 20, UtilServer.getPlayers()); } } diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/gametutorial/TutorialText.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/gametutorial/TutorialText.java index 98acc729f..82daa80c9 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/gametutorial/TutorialText.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/gametutorial/TutorialText.java @@ -23,17 +23,17 @@ public class TutorialText public TutorialText(String title, String text, int id, Sound sound) { - this(title, text, (int) (Math.round(1.5 * text.length()) + 25), id, sound); + this(title, text, (int) (Math.round(1.2 * text.length()) + 25), id, sound); } public TutorialText(String text, int id) { - this(null, text, (int) (Math.round(1.5 * text.length()) + 25), id, Sound.NOTE_PLING); + this(null, text, (int) (Math.round(1.2 * text.length()) + 25), id, Sound.NOTE_PLING); } public TutorialText(String text, int id, Sound sound) { - this(null, text, (int) (Math.round(1.5 * text.length()) + 25), id, sound); + this(null, text, (int) (Math.round(1.2 * text.length()) + 25), id, sound); } public TutorialText(String text, int stayTime, int id)