v2.2.0: disabled the blacksmith quest for now

This commit is contained in:
Evan Debenham
2023-09-03 18:39:59 -04:00
parent db782a5a90
commit a350ea8b4f
2 changed files with 24 additions and 14 deletions

View File

@@ -41,6 +41,7 @@ import com.shatteredpixel.shatteredpixeldungeon.windows.WndQuest;
import com.watabou.noosa.Game;
import com.watabou.utils.Bundle;
import com.watabou.utils.Callback;
import com.watabou.utils.DeviceCompat;
import com.watabou.utils.Random;
import java.util.ArrayList;
@@ -372,14 +373,21 @@ public class Blacksmith extends NPC {
rooms.add(new BlacksmithRoom());
spawned = true;
type = 1+Random.Int(3);
alternative = false;
//currently the new quest is disabled in production as it is incomplete
if (DeviceCompat.isDebug()){
type = 1+Random.Int(3);
alternative = false;
} else {
type = 0;
alternative = Random.Int(2) == 0;
}
given = false;
}
return rooms;
}
public static int Type(){
return type;
}

View File

@@ -34,6 +34,7 @@ import com.shatteredpixel.shatteredpixeldungeon.levels.traps.BurningTrap;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.tiles.CustomTilemap;
import com.watabou.noosa.Tilemap;
import com.watabou.utils.DeviceCompat;
import com.watabou.utils.Point;
import com.watabou.utils.Random;
@@ -79,24 +80,25 @@ public class BlacksmithRoom extends StandardRoom {
} while (level.heaps.get( npc.pos ) != null);
level.mobs.add( npc );
Random.pushGenerator(Dungeon.seedCurDepth()+1);
//currently the new quest is disabled in production as it is incomplete
if (DeviceCompat.isDebug()) {
int entrancePos;
do {
entrancePos = level.pointToCell(random( 2 ));
} while (level.heaps.get( npc.pos ) != null || entrancePos == npc.pos);
Random.popGenerator();
QuestEntrance vis = new QuestEntrance();
vis.pos(entrancePos, level);
level.customTiles.add(vis);
QuestEntrance vis = new QuestEntrance();
vis.pos(entrancePos, level);
level.customTiles.add(vis);
level.transitions.add(new LevelTransition(level,
entrancePos,
LevelTransition.Type.BRANCH_EXIT,
Dungeon.depth,
Dungeon.branch+1,
LevelTransition.Type.BRANCH_ENTRANCE));
Painter.set(level, entrancePos, Terrain.EXIT);
level.transitions.add(new LevelTransition(level,
entrancePos,
LevelTransition.Type.BRANCH_EXIT,
Dungeon.depth,
Dungeon.branch + 1,
LevelTransition.Type.BRANCH_ENTRANCE));
Painter.set(level, entrancePos, Terrain.EXIT);
}
for(Point p : getPoints()) {
int cell = level.pointToCell(p);