mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-24 05:47:59 +01:00
Decreased the cooldown time for the changeling feed ability
This commit is contained in:
parent
259819c7dc
commit
0d837f89da
1 changed files with 7 additions and 3 deletions
|
@ -41,12 +41,12 @@ public class PowerFeed implements IPower<Hit> {
|
|||
|
||||
@Override
|
||||
public int getWarmupTime(IPlayer player) {
|
||||
return 20;
|
||||
return 5;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCooldownTime(IPlayer player) {
|
||||
return 50;
|
||||
return canFeed(player) ? 15 : 80;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -57,7 +57,7 @@ public class PowerFeed implements IPower<Hit> {
|
|||
@Nullable
|
||||
@Override
|
||||
public Hit tryActivate(IPlayer player) {
|
||||
if (player.getOwner().getHealth() < player.getOwner().getMaxHealth() || player.getOwner().canEat(false)) {
|
||||
if (canFeed(player)) {
|
||||
if (!getTargets(player).isEmpty()) {
|
||||
return new Hit();
|
||||
}
|
||||
|
@ -66,6 +66,10 @@ public class PowerFeed implements IPower<Hit> {
|
|||
return null;
|
||||
}
|
||||
|
||||
private boolean canFeed(IPlayer player) {
|
||||
return player.getOwner().getHealth() < player.getOwner().getMaxHealth() || player.getOwner().canEat(false);
|
||||
}
|
||||
|
||||
private boolean canDrain(Entity e) {
|
||||
return (e instanceof EntityLivingBase)
|
||||
&& (e instanceof EntityCow
|
||||
|
|
Loading…
Reference in a new issue