v0.7.5: fixed crash issues with tengu
This commit is contained in:
parent
ffbd1dbf7b
commit
a7d7a50e45
|
@ -347,7 +347,7 @@ public class NewTengu extends Mob {
|
||||||
@Override
|
@Override
|
||||||
public boolean act(boolean enemyInFOV, boolean justAlerted) {
|
public boolean act(boolean enemyInFOV, boolean justAlerted) {
|
||||||
|
|
||||||
if (!enemyInFOV && fieldOfView[enemy.pos]){
|
if (enemy != null && !enemyInFOV && fieldOfView[enemy.pos]){
|
||||||
if (!yelledCoward) {
|
if (!yelledCoward) {
|
||||||
yell(Messages.get(NewTengu.class, "coward"));
|
yell(Messages.get(NewTengu.class, "coward"));
|
||||||
yelledCoward = true;
|
yelledCoward = true;
|
||||||
|
@ -456,6 +456,11 @@ public class NewTengu extends Mob {
|
||||||
switch (abilityToUse){
|
switch (abilityToUse){
|
||||||
case BOMB_ABILITY : default:
|
case BOMB_ABILITY : default:
|
||||||
abilityUsed = throwBomb(NewTengu.this, enemy);
|
abilityUsed = throwBomb(NewTengu.this, enemy);
|
||||||
|
//if Tengu cannot use his bomb ability first, use fire instead.
|
||||||
|
if (abilitiesUsed == 0 && !abilityUsed){
|
||||||
|
abilityToUse = FIRE_ABILITY;
|
||||||
|
abilityUsed = throwFire(NewTengu.this, enemy);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case FIRE_ABILITY:
|
case FIRE_ABILITY:
|
||||||
abilityUsed = throwFire(NewTengu.this, enemy);
|
abilityUsed = throwFire(NewTengu.this, enemy);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user