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.
60 lines
851 B
60 lines
851 B
10 years ago
|
package mightypork.rogue.world.entity.impl;
|
||
10 years ago
|
|
||
|
|
||
|
import mightypork.rogue.world.entity.Entity;
|
||
|
|
||
|
|
||
10 years ago
|
public class GrayRatAi extends MonsterAi {
|
||
10 years ago
|
|
||
10 years ago
|
public GrayRatAi(Entity entity)
|
||
10 years ago
|
{
|
||
|
super(entity);
|
||
|
|
||
10 years ago
|
setAttackTime(1.2);
|
||
|
setScanTime(1.5);
|
||
10 years ago
|
setSleepTime(10);
|
||
10 years ago
|
}
|
||
|
|
||
|
|
||
|
@Override
|
||
|
protected double getScanRadius()
|
||
|
{
|
||
|
return isSleeping() ? 2 + rand.nextInt(3) : 4 + rand.nextInt(3);
|
||
|
}
|
||
|
|
||
|
|
||
|
@Override
|
||
|
protected double getAttackDistance()
|
||
|
{
|
||
10 years ago
|
return 1.1;
|
||
10 years ago
|
}
|
||
|
|
||
|
|
||
|
@Override
|
||
|
protected int getAttackStrength()
|
||
|
{
|
||
10 years ago
|
return 1 + (rand.nextInt(5) == 0 ? 1 : 0);
|
||
10 years ago
|
}
|
||
|
|
||
|
|
||
|
@Override
|
||
|
protected int getPreyAbandonDistance()
|
||
|
{
|
||
|
return 8 + rand.nextInt(4);
|
||
|
}
|
||
|
|
||
|
|
||
|
@Override
|
||
|
protected boolean shouldSkipScan()
|
||
|
{
|
||
|
return false;//rand.nextInt(3) == 0;
|
||
|
}
|
||
|
|
||
|
|
||
|
@Override
|
||
|
protected boolean shouldRandomlyAbandonPrey()
|
||
|
{
|
||
|
return false;//rand.nextInt(8) == 0;
|
||
|
}
|
||
|
}
|