v0.3.0: tweaked charm mechanics for mobs, ranged enemies will now fail to attack when charmed.
This commit is contained in:
parent
ec2ba6afca
commit
bc64d00e17
|
@ -255,7 +255,7 @@ public abstract class Mob extends Char {
|
|||
}
|
||||
|
||||
protected boolean canAttack( Char enemy ) {
|
||||
return Level.adjacent( pos, enemy.pos ) && !isCharmedBy( enemy );
|
||||
return Level.adjacent( pos, enemy.pos );
|
||||
}
|
||||
|
||||
protected boolean getCloser( int target ) {
|
||||
|
@ -566,7 +566,7 @@ public abstract class Mob extends Char {
|
|||
@Override
|
||||
public boolean act( boolean enemyInFOV, boolean justAlerted ) {
|
||||
enemySeen = enemyInFOV;
|
||||
if (enemyInFOV && canAttack( enemy )) {
|
||||
if (enemyInFOV && !isCharmedBy( enemy ) && canAttack( enemy )) {
|
||||
|
||||
return doAttack( enemy );
|
||||
|
||||
|
|
|
@ -115,7 +115,7 @@ public class Tengu extends Mob {
|
|||
|
||||
@Override
|
||||
protected boolean canAttack( Char enemy ) {
|
||||
return Ballistica.cast( pos, enemy.pos, false, true ) == enemy.pos && !isCharmedBy( enemy );
|
||||
return Ballistica.cast( pos, enemy.pos, false, true ) == enemy.pos;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue
Block a user