v0.2.2: fixed a bug with the ghost quest.
This commit is contained in:
parent
161b444d67
commit
2d176b4b62
|
@ -155,21 +155,25 @@ public class Ghost extends NPC {
|
|||
Sample.INSTANCE.play( Assets.SND_GHOST );
|
||||
|
||||
if (Quest.given) {
|
||||
|
||||
if (Quest.processed || Dungeon.hero.belongings.getItem( RatSkull.class ) != null){
|
||||
GameScene.show( new WndSadGhost( this, Quest.type ) );
|
||||
if (Quest.weapon != null) {
|
||||
if (Quest.processed || Dungeon.hero.belongings.getItem(RatSkull.class) != null) {
|
||||
GameScene.show(new WndSadGhost(this, Quest.type));
|
||||
} else {
|
||||
switch (Quest.type){
|
||||
case 1: default:
|
||||
GameScene.show( new WndQuest( this, TXT_RAT2 ) ); break;
|
||||
switch (Quest.type) {
|
||||
case 1:
|
||||
default:
|
||||
GameScene.show(new WndQuest(this, TXT_RAT2));
|
||||
break;
|
||||
case 2:
|
||||
GameScene.show( new WndQuest( this, TXT_GNOLL2 ) ); break;
|
||||
GameScene.show(new WndQuest(this, TXT_GNOLL2));
|
||||
break;
|
||||
case 3:
|
||||
GameScene.show( new WndQuest( this, TXT_CRAB2 ) ); break;
|
||||
GameScene.show(new WndQuest(this, TXT_CRAB2));
|
||||
break;
|
||||
}
|
||||
|
||||
int newPos = -1;
|
||||
for (int i=0; i < 10; i++) {
|
||||
for (int i = 0; i < 10; i++) {
|
||||
newPos = Dungeon.level.randomRespawnCell();
|
||||
if (newPos != -1) {
|
||||
break;
|
||||
|
@ -177,15 +181,15 @@ public class Ghost extends NPC {
|
|||
}
|
||||
if (newPos != -1) {
|
||||
|
||||
Actor.freeCell( pos );
|
||||
Actor.freeCell(pos);
|
||||
|
||||
CellEmitter.get( pos ).start( Speck.factory( Speck.LIGHT ), 0.2f, 3 );
|
||||
CellEmitter.get(pos).start(Speck.factory(Speck.LIGHT), 0.2f, 3);
|
||||
pos = newPos;
|
||||
sprite.place( pos );
|
||||
sprite.place(pos);
|
||||
sprite.visible = Dungeon.visible[pos];
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
} else {
|
||||
Mob questBoss;
|
||||
String txt_quest;
|
||||
|
|
Loading…
Reference in New Issue
Block a user