SSM Hunger Fix
This commit is contained in:
parent
07d9610bf7
commit
630281c663
@ -60,7 +60,7 @@ public class BlockForm extends Form
|
|||||||
|
|
||||||
//Player > Chicken
|
//Player > Chicken
|
||||||
DisguiseChicken disguise = new DisguiseChicken(Player);
|
DisguiseChicken disguise = new DisguiseChicken(Player);
|
||||||
disguise.setBaby();
|
disguise.setBaby();
|
||||||
disguise.setSoundDisguise(new DisguiseCat(Player));
|
disguise.setSoundDisguise(new DisguiseCat(Player));
|
||||||
Host.Manager.GetDisguise().disguise(disguise);
|
Host.Manager.GetDisguise().disguise(disguise);
|
||||||
|
|
||||||
|
@ -342,7 +342,7 @@ public class SuperSmash extends SoloGame
|
|||||||
if (!IsLive())
|
if (!IsLive())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
hungerTick = (hungerTick + 1)%8;
|
hungerTick = (hungerTick + 1)%10;
|
||||||
|
|
||||||
for (Player player : GetPlayers(true))
|
for (Player player : GetPlayers(true))
|
||||||
{
|
{
|
||||||
@ -363,21 +363,21 @@ public class SuperSmash extends SoloGame
|
|||||||
@EventHandler(priority = EventPriority.MONITOR)
|
@EventHandler(priority = EventPriority.MONITOR)
|
||||||
public void HungerRestore(CustomDamageEvent event)
|
public void HungerRestore(CustomDamageEvent event)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (event.IsCancelled())
|
if (event.IsCancelled())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (event.GetDamagerPlayer(true) != null)
|
if (event.GetDamagerPlayer(true) == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Player damager = event.GetDamagerPlayer(true);
|
Player damager = event.GetDamagerPlayer(true);
|
||||||
if (damager == null)
|
if (damager == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!Recharge.Instance.use(damager, "Hunger Restore", 250, false))
|
if (!Recharge.Instance.use(damager, "Hunger Restore", 250, false))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
int amount = Math.max(1, (int)(event.GetDamage()/2));
|
int amount = Math.max(1, (int)(event.GetDamage()/2));
|
||||||
UtilPlayer.hunger(damager, amount);
|
UtilPlayer.hunger(damager, amount);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user