Gem fix, now correctly displays scaled gems.
UHC public changes Snake fixes.
This commit is contained in:
parent
c8386bbc40
commit
377f4b0680
@ -136,10 +136,10 @@ public class Snake extends SoloGame
|
||||
|
||||
for (Player player : GetPlayers(true))
|
||||
{
|
||||
double mult = 0.5;
|
||||
double mult = 0.3;
|
||||
|
||||
if (_tail.containsKey(player))
|
||||
mult += Math.min(0.8, (double)_tail.get(player).size() / _maxSpeed);
|
||||
mult += Math.min(0.9, (double)_tail.get(player).size() / _maxSpeed);
|
||||
|
||||
if (_speed.containsKey(player))
|
||||
mult = mult * 1.7;
|
||||
@ -165,7 +165,7 @@ public class Snake extends SoloGame
|
||||
loc = tail.getLocation().add(UtilAlg.getTrajectory(tail.getLocation(), loc).multiply(12));
|
||||
|
||||
//Move Mult
|
||||
double moveMult = 1.1;
|
||||
double moveMult = 1.2;
|
||||
|
||||
//Move
|
||||
EntityCreature ec = ((CraftCreature)tail).getHandle();
|
||||
@ -206,22 +206,7 @@ public class Snake extends SoloGame
|
||||
|
||||
if (UtilMath.offset(player, tail) < 1.2)
|
||||
{
|
||||
//Damage Event
|
||||
Manager.GetDamage().NewDamageEvent(player, other, null,
|
||||
DamageCause.CUSTOM, 500, false, true, false,
|
||||
other.getName(), "Snake Tail");
|
||||
|
||||
if (_tail.containsKey(player))
|
||||
{
|
||||
for (Creature cur : _tail.get(player))
|
||||
{
|
||||
cur.playEffect(EntityEffect.HURT);
|
||||
cur.remove();
|
||||
}
|
||||
|
||||
_tail.get(player).clear();
|
||||
}
|
||||
|
||||
KillPlayer(player, other);
|
||||
|
||||
done = true;
|
||||
break;
|
||||
@ -234,6 +219,28 @@ public class Snake extends SoloGame
|
||||
}
|
||||
}
|
||||
|
||||
public void KillPlayer(Player player, Player killer)
|
||||
{
|
||||
if (killer != null)
|
||||
{
|
||||
//Damage Event
|
||||
Manager.GetDamage().NewDamageEvent(player, killer, null,
|
||||
DamageCause.CUSTOM, 500, false, true, false,
|
||||
killer.getName(), "Snake Tail");
|
||||
}
|
||||
|
||||
if (_tail.containsKey(player))
|
||||
{
|
||||
for (Creature cur : _tail.get(player))
|
||||
{
|
||||
cur.playEffect(EntityEffect.HURT);
|
||||
cur.remove();
|
||||
}
|
||||
|
||||
_tail.get(player).clear();
|
||||
}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void SpawnFood(UpdateEvent event)
|
||||
{
|
||||
@ -334,6 +341,17 @@ public class Snake extends SoloGame
|
||||
@EventHandler
|
||||
public void DamageCancel(CustomDamageEvent event)
|
||||
{
|
||||
if (event.GetCause() == DamageCause.LAVA)
|
||||
{
|
||||
if (event.GetDamageePlayer() != null)
|
||||
KillPlayer(event.GetDamageePlayer(), null);
|
||||
|
||||
else
|
||||
event.AddMod("Lava", "Lava", 5000, false);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (event.GetCause() != DamageCause.CUSTOM)
|
||||
event.SetCancelled("Snake Damage");
|
||||
}
|
||||
|
@ -108,7 +108,7 @@ public class UHC extends TeamGame
|
||||
|
||||
new String[] {
|
||||
"20 minutes of no PvP",
|
||||
"Borders at -1000 and 1000",
|
||||
"Borders at -1250 and 1250",
|
||||
"No default health regeneration",
|
||||
"Last player/team alive wins!"
|
||||
});
|
||||
@ -138,12 +138,12 @@ public class UHC extends TeamGame
|
||||
|
||||
this.DeathMessages = false;
|
||||
|
||||
this.IdleKick = false;
|
||||
|
||||
this.AutoStart = false;
|
||||
|
||||
this.SoupEnabled = false;
|
||||
|
||||
this.IdleKick = true;
|
||||
this.AutoStart = true;
|
||||
this.CompassEnabled = true;
|
||||
|
||||
CraftRecipes();
|
||||
|
||||
///_listHealth = this.GetScoreboard().registerNewObjective("Health", "health");
|
||||
@ -406,7 +406,7 @@ public class UHC extends TeamGame
|
||||
|
||||
double dist = 250;
|
||||
if (_soloGame)
|
||||
dist = 200;
|
||||
dist = 80;
|
||||
|
||||
//Ensure 250 Blocks between Teams
|
||||
while (true)
|
||||
@ -578,6 +578,8 @@ public class UHC extends TeamGame
|
||||
{
|
||||
Player player = event.getPlayer();
|
||||
|
||||
|
||||
|
||||
GameTeam team = GetTeam(player);
|
||||
if (team == null) return;
|
||||
|
||||
@ -592,6 +594,15 @@ public class UHC extends TeamGame
|
||||
if (player.isDead())
|
||||
return;
|
||||
|
||||
if (true)
|
||||
{
|
||||
//Announcement
|
||||
Announce(team.GetColor() + C.Bold + player.getName() + " was killed for disconnecting.");
|
||||
|
||||
player.damage(5000);
|
||||
return;
|
||||
}
|
||||
|
||||
if (_combatTime.containsKey(player.getName()) && !UtilTime.elapsed(_combatTime.get(player.getName()), 15000))
|
||||
{
|
||||
//Announcement
|
||||
|
@ -172,7 +172,7 @@ public class GameGemManager implements Listener
|
||||
if (amount > 0)
|
||||
amountStr = amount + " ";
|
||||
|
||||
UtilPlayer.message(player, F.elem(C.cGreen + "+" + gemCount + " Gems") + " for " + F.elem(amountStr + type));
|
||||
UtilPlayer.message(player, F.elem(C.cGreen + "+" + (gemCount * game.GemMultiplier) + " Gems") + " for " + F.elem(amountStr + type));
|
||||
}
|
||||
|
||||
earnedGems = (int) (earnedGems * game.GemMultiplier);
|
||||
|
Loading…
Reference in New Issue
Block a user