mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-27 15:17: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
|
@Override
|
||||||
public int getWarmupTime(IPlayer player) {
|
public int getWarmupTime(IPlayer player) {
|
||||||
return 20;
|
return 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getCooldownTime(IPlayer player) {
|
public int getCooldownTime(IPlayer player) {
|
||||||
return 50;
|
return canFeed(player) ? 15 : 80;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -57,7 +57,7 @@ public class PowerFeed implements IPower<Hit> {
|
||||||
@Nullable
|
@Nullable
|
||||||
@Override
|
@Override
|
||||||
public Hit tryActivate(IPlayer player) {
|
public Hit tryActivate(IPlayer player) {
|
||||||
if (player.getOwner().getHealth() < player.getOwner().getMaxHealth() || player.getOwner().canEat(false)) {
|
if (canFeed(player)) {
|
||||||
if (!getTargets(player).isEmpty()) {
|
if (!getTargets(player).isEmpty()) {
|
||||||
return new Hit();
|
return new Hit();
|
||||||
}
|
}
|
||||||
|
@ -66,6 +66,10 @@ public class PowerFeed implements IPower<Hit> {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private boolean canFeed(IPlayer player) {
|
||||||
|
return player.getOwner().getHealth() < player.getOwner().getMaxHealth() || player.getOwner().canEat(false);
|
||||||
|
}
|
||||||
|
|
||||||
private boolean canDrain(Entity e) {
|
private boolean canDrain(Entity e) {
|
||||||
return (e instanceof EntityLivingBase)
|
return (e instanceof EntityLivingBase)
|
||||||
&& (e instanceof EntityCow
|
&& (e instanceof EntityCow
|
||||||
|
|
Loading…
Reference in a new issue