You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
49 lines
694 B
49 lines
694 B
10 years ago
|
package mightypork.rogue.world.entity.impl;
|
||
10 years ago
|
|
||
|
|
||
|
import mightypork.rogue.world.entity.AiTimer;
|
||
|
import mightypork.rogue.world.entity.Entity;
|
||
|
|
||
|
|
||
|
public class BossRatAi extends GrayRatAi {
|
||
|
|
||
|
private final AiTimer healTimer = new AiTimer(0.5) {
|
||
|
|
||
|
@Override
|
||
|
public void run()
|
||
|
{
|
||
|
entity.health.addHealth(1); // heal
|
||
|
}
|
||
|
};
|
||
|
|
||
|
|
||
|
public BossRatAi(Entity entity)
|
||
|
{
|
||
|
super(entity);
|
||
|
|
||
|
setAttackTime(0.6);
|
||
|
}
|
||
|
|
||
|
|
||
|
@Override
|
||
|
protected int getAttackStrength()
|
||
|
{
|
||
|
return 5 + rand.nextInt(4);
|
||
|
}
|
||
|
|
||
|
|
||
|
@Override
|
||
|
protected int getPreyAbandonDistance()
|
||
|
{
|
||
|
return 15 + rand.nextInt(4);
|
||
|
}
|
||
|
|
||
|
|
||
|
@Override
|
||
|
public void update(double delta)
|
||
|
{
|
||
|
super.update(delta);
|
||
|
healTimer.update(delta);
|
||
|
}
|
||
|
}
|