v2.3.0: switched internal quest order for fungi and gnoll quests
This commit is contained in:
@@ -1122,7 +1122,7 @@ public abstract class Mob extends Char {
|
||||
} else if (enemy == null) {
|
||||
sprite.showLost();
|
||||
state = WANDERING;
|
||||
target = Dungeon.level.randomDestination( Mob.this );
|
||||
target = ((Mob.Wandering)WANDERING).randomDestination();
|
||||
spend( TICK );
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -102,8 +102,8 @@ public class Blacksmith extends NPC {
|
||||
|
||||
switch (Quest.type){
|
||||
case Quest.CRYSTAL: msg2 += Messages.get(Blacksmith.this, "intro_quest_crystal"); break;
|
||||
case Quest.FUNGI: msg2 += Messages.get(Blacksmith.this, "intro_quest_fungi"); break;
|
||||
case Quest.GNOLL: msg2 += Messages.get(Blacksmith.this, "intro_quest_gnoll"); break;
|
||||
case Quest.FUNGI: msg2 += Messages.get(Blacksmith.this, "intro_quest_fungi"); break;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -259,8 +259,8 @@ public class Blacksmith extends NPC {
|
||||
private static int type = 0;
|
||||
public static final int OLD = 0;
|
||||
public static final int CRYSTAL = 1;
|
||||
public static final int FUNGI = 2;
|
||||
public static final int GNOLL = 3;
|
||||
public static final int GNOLL = 2;
|
||||
public static final int FUNGI = 3;
|
||||
//pre-v2.2.0
|
||||
private static boolean alternative; //false for mining gold, true for bat blood
|
||||
|
||||
|
||||
@@ -130,7 +130,7 @@ public class CavesLevel extends RegularLevel {
|
||||
GLog.w(Messages.get(Blacksmith.class, "cant_enter_old"));
|
||||
} else if (smith == null || !Blacksmith.Quest.given() || Blacksmith.Quest.completed()) {
|
||||
GLog.w(Messages.get(Blacksmith.class, "entrance_blocked"));
|
||||
} else if (!Blacksmith.Quest.started() && Blacksmith.Quest.Type() != 0){
|
||||
} else if (!Blacksmith.Quest.started() && Blacksmith.Quest.Type() != Blacksmith.Quest.OLD){
|
||||
final Pickaxe pick = hero.belongings.getItem(Pickaxe.class);
|
||||
Game.runOnRenderThread(new Callback() {
|
||||
@Override
|
||||
|
||||
@@ -149,10 +149,10 @@ public class MiningLevel extends CavesLevel {
|
||||
return new Bat();
|
||||
case Blacksmith.Quest.CRYSTAL:
|
||||
return new CrystalWisp();
|
||||
case Blacksmith.Quest.FUNGI:
|
||||
return new Spinner();
|
||||
case Blacksmith.Quest.GNOLL:
|
||||
return new GnollGuard();
|
||||
case Blacksmith.Quest.FUNGI:
|
||||
return new Spinner();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -212,8 +212,7 @@ public class MiningLevel extends CavesLevel {
|
||||
@Override
|
||||
public boolean activateTransition(Hero hero, LevelTransition transition) {
|
||||
if (transition.type == LevelTransition.Type.BRANCH_ENTRANCE
|
||||
&& !Blacksmith.Quest.completed() && Blacksmith.Quest.Type() != 0) {
|
||||
|
||||
&& !Blacksmith.Quest.completed() && Blacksmith.Quest.Type() != Blacksmith.Quest.OLD) {
|
||||
|
||||
if (hero.belongings.getItem(Pickaxe.class) == null){
|
||||
Game.runOnRenderThread(new Callback() {
|
||||
@@ -244,9 +243,9 @@ public class MiningLevel extends CavesLevel {
|
||||
|
||||
if (!Blacksmith.Quest.bossBeaten()){
|
||||
switch (Blacksmith.Quest.Type()){
|
||||
case 1: warnText += "\n\n" + Messages.get(Blacksmith.class, "exit_warn_crystal"); break;
|
||||
case 2: warnText += "\n\n" + Messages.get(Blacksmith.class, "exit_warn_fungi"); break;
|
||||
case 3: warnText += "\n\n" + Messages.get(Blacksmith.class, "exit_warn_gnoll"); break;
|
||||
case Blacksmith.Quest.CRYSTAL: warnText += "\n\n" + Messages.get(Blacksmith.class, "exit_warn_crystal"); break;
|
||||
case Blacksmith.Quest.GNOLL: warnText += "\n\n" + Messages.get(Blacksmith.class, "exit_warn_gnoll"); break;
|
||||
case Blacksmith.Quest.FUNGI: warnText += "\n\n" + Messages.get(Blacksmith.class, "exit_warn_fungi"); break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -67,16 +67,6 @@ public class MineGiantRoom extends CaveRoom {
|
||||
level.mobs.add(m);
|
||||
Painter.set(level, p, Terrain.EMPTY);
|
||||
|
||||
} else if (Blacksmith.Quest.Type() == Blacksmith.Quest.FUNGI){
|
||||
Painter.fillEllipse(level, this, 3, Terrain.EMPTY);
|
||||
|
||||
for (int i = 0; i < width()*height()/2; i ++){
|
||||
Point r = random(1);
|
||||
if (level.map[level.pointToCell(r)] != Terrain.WALL) {
|
||||
Painter.set(level, r, Terrain.HIGH_GRASS);
|
||||
}
|
||||
}
|
||||
|
||||
} else if (Blacksmith.Quest.Type() == Blacksmith.Quest.GNOLL){
|
||||
Painter.fillEllipse(level, this, 3, Terrain.EMPTY);
|
||||
|
||||
@@ -123,6 +113,16 @@ public class MineGiantRoom extends CaveRoom {
|
||||
}
|
||||
}
|
||||
|
||||
} else if (Blacksmith.Quest.Type() == Blacksmith.Quest.FUNGI){
|
||||
Painter.fillEllipse(level, this, 3, Terrain.EMPTY);
|
||||
|
||||
for (int i = 0; i < width()*height()/2; i ++){
|
||||
Point r = random(1);
|
||||
if (level.map[level.pointToCell(r)] != Terrain.WALL) {
|
||||
Painter.set(level, r, Terrain.HIGH_GRASS);
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
Painter.fillEllipse(level, this, 3, Terrain.EMPTY);
|
||||
}
|
||||
|
||||
@@ -95,16 +95,6 @@ public class MineLargeRoom extends CaveRoom {
|
||||
level.mobs.add(m);
|
||||
Painter.set(level, p, Terrain.EMPTY);
|
||||
|
||||
} else if (Blacksmith.Quest.Type() == Blacksmith.Quest.FUNGI){
|
||||
Painter.fillEllipse(level, this, 3, Terrain.EMPTY);
|
||||
|
||||
for (int i = 0; i < width() * height() / 4; i++) {
|
||||
Point r = random(1);
|
||||
if (level.map[level.pointToCell(r)] != Terrain.WALL) {
|
||||
Painter.set(level, r, Terrain.HIGH_GRASS);
|
||||
}
|
||||
}
|
||||
|
||||
} else if (Blacksmith.Quest.Type() == Blacksmith.Quest.GNOLL){
|
||||
Painter.fillEllipse(level, this, 3, Terrain.EMPTY);
|
||||
|
||||
@@ -179,6 +169,16 @@ public class MineLargeRoom extends CaveRoom {
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (Blacksmith.Quest.Type() == Blacksmith.Quest.FUNGI){
|
||||
Painter.fillEllipse(level, this, 3, Terrain.EMPTY);
|
||||
|
||||
for (int i = 0; i < width() * height() / 4; i++) {
|
||||
Point r = random(1);
|
||||
if (level.map[level.pointToCell(r)] != Terrain.WALL) {
|
||||
Painter.set(level, r, Terrain.HIGH_GRASS);
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
Painter.fillEllipse(level, this, 3, Terrain.EMPTY);
|
||||
}
|
||||
|
||||
@@ -46,15 +46,15 @@ public class MineSecretRoom extends SecretRoom {
|
||||
|
||||
if (Blacksmith.Quest.Type() == Blacksmith.Quest.CRYSTAL) {
|
||||
Painter.fill(level, this, 1, Terrain.MINE_CRYSTAL);
|
||||
} else if (Blacksmith.Quest.Type() == Blacksmith.Quest.GNOLL) {
|
||||
Painter.fill( level, this, 1, Terrain.EMPTY_SP );
|
||||
level.drop(new DarkGold().quantity(Random.NormalIntRange(3, 5)), level.pointToCell(center())).type = Heap.Type.CHEST;
|
||||
return;
|
||||
} else if (Blacksmith.Quest.Type() == Blacksmith.Quest.FUNGI) {
|
||||
Painter.fill(level, this, 1, Terrain.HIGH_GRASS);
|
||||
|
||||
//random plant?
|
||||
|
||||
} else if (Blacksmith.Quest.Type() == Blacksmith.Quest.GNOLL) {
|
||||
Painter.fill( level, this, 1, Terrain.EMPTY_SP );
|
||||
level.drop(new DarkGold().quantity(Random.NormalIntRange(3, 5)), level.pointToCell(center())).type = Heap.Type.CHEST;
|
||||
return;
|
||||
} else {
|
||||
Painter.fill(level, this, 1, Terrain.EMPTY);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user