v2.2.0: opened up new blacksmith quest as it is now fully playable

This commit is contained in:
Evan Debenham
2023-09-22 15:54:07 -04:00
parent 069f2fdbc2
commit 1c3b420f2e
2 changed files with 18 additions and 28 deletions
@@ -41,7 +41,6 @@ import com.shatteredpixel.shatteredpixeldungeon.windows.WndQuest;
import com.watabou.noosa.Game; import com.watabou.noosa.Game;
import com.watabou.utils.Bundle; import com.watabou.utils.Bundle;
import com.watabou.utils.Callback; import com.watabou.utils.Callback;
import com.watabou.utils.DeviceCompat;
import com.watabou.utils.Random; import com.watabou.utils.Random;
import java.util.ArrayList; import java.util.ArrayList;
@@ -373,15 +372,10 @@ public class Blacksmith extends NPC {
rooms.add(new BlacksmithRoom()); rooms.add(new BlacksmithRoom());
spawned = true; spawned = true;
//currently the new quest is disabled in production as it is incomplete //currently only the crystal quest is ready to play
if (DeviceCompat.isDebug()){ //we still roll for quest type however, to ensure seed consistency
//type = 1+Random.Int(3); type = 1+Random.Int(1);
type = CRYSTAL; alternative = false;
alternative = false;
} else {
type = OLD;
alternative = Random.Int(2) == 0;
}
given = false; given = false;
@@ -34,7 +34,6 @@ import com.shatteredpixel.shatteredpixeldungeon.levels.traps.BurningTrap;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.tiles.CustomTilemap; import com.shatteredpixel.shatteredpixeldungeon.tiles.CustomTilemap;
import com.watabou.noosa.Tilemap; import com.watabou.noosa.Tilemap;
import com.watabou.utils.DeviceCompat;
import com.watabou.utils.Point; import com.watabou.utils.Point;
import com.watabou.utils.Random; import com.watabou.utils.Random;
@@ -80,25 +79,22 @@ public class BlacksmithRoom extends StandardRoom {
} while (level.heaps.get( npc.pos ) != null); } while (level.heaps.get( npc.pos ) != null);
level.mobs.add( npc ); level.mobs.add( npc );
//currently the new quest is disabled in production as it is incomplete int entrancePos;
if (DeviceCompat.isDebug()) { do {
int entrancePos; entrancePos = level.pointToCell(random( 2 ));
do { } while (level.heaps.get( npc.pos ) != null || entrancePos == npc.pos);
entrancePos = level.pointToCell(random( 2 ));
} while (level.heaps.get( npc.pos ) != null || entrancePos == npc.pos);
QuestEntrance vis = new QuestEntrance(); QuestEntrance vis = new QuestEntrance();
vis.pos(entrancePos, level); vis.pos(entrancePos, level);
level.customTiles.add(vis); level.customTiles.add(vis);
level.transitions.add(new LevelTransition(level, level.transitions.add(new LevelTransition(level,
entrancePos, entrancePos,
LevelTransition.Type.BRANCH_EXIT, LevelTransition.Type.BRANCH_EXIT,
Dungeon.depth, Dungeon.depth,
Dungeon.branch + 1, Dungeon.branch + 1,
LevelTransition.Type.BRANCH_ENTRANCE)); LevelTransition.Type.BRANCH_ENTRANCE));
Painter.set(level, entrancePos, Terrain.EXIT); Painter.set(level, entrancePos, Terrain.EXIT);
}
for(Point p : getPoints()) { for(Point p : getPoints()) {
int cell = level.pointToCell(p); int cell = level.pointToCell(p);