ghost = new GhostHero( this ); ghostID = ghost.id(); ghost.pos = Random.element(spawnPoints); ghost.yell( Messages.get(GhostHero.class, "hello", Dungeon.hero.givenName()) ); Sample.INSTANCE.play( Assets.SND_GHOST ); firstSummon = true; } else ghost.saySpawned();
ghost = new GhostHero( this ); ghostID = ghost.id(); ghost.pos = Random.element(spawnPoints); ghost.yell( Messages.get(GhostHero.class, "hello", Dungeon.hero.givenName()) ); Sample.INSTANCE.play( Assets.SND_GHOST ); firstSummon = true; } else ghost.saySpawned();
@Override public boolean interact() { updateRose(); if (rose != null && !rose.talkedTo){ rose.talkedTo = true; GameScene.show(new WndQuest(this, Messages.get(this, "introduce") )); return false; } else if (Dungeon.level.passable[pos] || Dungeon.hero.flying) { int curPos = pos; moveSprite( pos, Dungeon.hero.pos ); move( Dungeon.hero.pos ); Dungeon.hero.sprite.move( Dungeon.hero.pos, curPos ); Dungeon.hero.move( curPos ); Dungeon.hero.spend( 1 / Dungeon.hero.speed() ); Dungeon.hero.busy(); return true; } else { return false; } }
@Override public boolean interact() { updateRose(); if (rose != null && !rose.talkedTo){ rose.talkedTo = true; GameScene.show(new WndQuest(this, Messages.get(this, "introduce") )); return false; } else if (Dungeon.level.passable[pos] || Dungeon.hero.flying) { int curPos = pos; moveSprite( pos, Dungeon.hero.pos ); move( Dungeon.hero.pos ); Dungeon.hero.sprite.move( Dungeon.hero.pos, curPos ); Dungeon.hero.move( curPos ); Dungeon.hero.spend( 1 / Dungeon.hero.speed() ); Dungeon.hero.busy(); return true; } else { return false; } }
@Override protected boolean act() { updateRose(); if (rose == null || !rose.isEquipped(Dungeon.hero)){ damage(1, this); } if (!isAlive()) return true; if (!Dungeon.hero.isAlive()){ sayHeroKilled(); sprite.die(); destroy(); return true; } return super.act(); }
@Override protected boolean act() { updateRose(); if (rose == null || !rose.isEquipped(Dungeon.hero)){ damage(1, this); } if (!isAlive()) return true; if (!Dungeon.hero.isAlive()){ sayHeroKilled(); sprite.die(); destroy(); return true; } return super.act(); }
@Override public void die(Object cause) { sayDefeated(); super.die(cause); }
@Override public void die(Object cause) { sayDefeated(); super.die(cause); }
public void saySpawned(){ if (Messages.lang() != Languages.ENGLISH) return; //don't say anything if not on english int i = (Dungeon.depth - 1) / 5; fieldOfView = new boolean[Dungeon.level.length()]; Dungeon.level.updateFieldOfView(this, fieldOfView); if (chooseEnemy() == null) yell( Random.element( VOICE_AMBIENT[i] ) ); else yell( Random.element( VOICE_ENEMIES[i][ Dungeon.bossLevel() ? 1 : 0 ] ) ); Sample.INSTANCE.play( Assets.SND_GHOST ); }
public void saySpawned(){ if (Messages.lang() != Languages.ENGLISH) return; //don't say anything if not on english int i = (Dungeon.depth - 1) / 5; fieldOfView = new boolean[Dungeon.level.length()]; Dungeon.level.updateFieldOfView(this, fieldOfView); if (chooseEnemy() == null) yell( Random.element( VOICE_AMBIENT[i] ) ); else yell( Random.element( VOICE_ENEMIES[i][ Dungeon.bossLevel() ? 1 : 0 ] ) ); Sample.INSTANCE.play( Assets.SND_GHOST ); }