v0.3.0e: cleaned up the gnoll trickster's code, enforces parity with scorpios
This commit is contained in:
parent
14a2d4d8b2
commit
5ed738a5eb
|
@ -468,17 +468,13 @@ public class Ghost extends NPC {
|
|||
@Override
|
||||
protected boolean canAttack( Char enemy ) {
|
||||
Ballistica attack = new Ballistica( pos, enemy.pos, Ballistica.PROJECTILE);
|
||||
if (!Level.adjacent(pos, enemy.pos) && attack.collisionPos == enemy.pos){
|
||||
combo++;
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
return !Level.adjacent( pos, enemy.pos ) && attack.collisionPos == enemy.pos;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int attackProc( Char enemy, int damage ) {
|
||||
//The gnoll's attacks get more severe the more the player lets it hit them
|
||||
combo++;
|
||||
int effect = Random.Int(4)+combo;
|
||||
|
||||
if (effect > 2) {
|
||||
|
@ -499,8 +495,8 @@ public class Ghost extends NPC {
|
|||
@Override
|
||||
protected boolean getCloser( int target ) {
|
||||
combo = 0; //if he's moving, he isn't attacking, reset combo.
|
||||
if (enemy != null && Level.adjacent(pos, enemy.pos)) {
|
||||
return getFurther( target );
|
||||
if (state == HUNTING) {
|
||||
return enemySeen && getFurther( target );
|
||||
} else {
|
||||
return super.getCloser( target );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user