v1.4.0: fixed summons from guardian trap counting as levelgen statues
This commit is contained in:
@@ -48,6 +48,8 @@ public class Statue extends Mob {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected Weapon weapon;
|
protected Weapon weapon;
|
||||||
|
|
||||||
|
public boolean levelGenStatue = true;
|
||||||
|
|
||||||
public Statue() {
|
public Statue() {
|
||||||
super();
|
super();
|
||||||
@@ -78,7 +80,7 @@ public class Statue extends Mob {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected boolean act() {
|
protected boolean act() {
|
||||||
if (Dungeon.level.heroFOV[pos]) {
|
if (levelGenStatue && Dungeon.level.heroFOV[pos]) {
|
||||||
Notes.add( Notes.Landmark.STATUE );
|
Notes.add( Notes.Landmark.STATUE );
|
||||||
}
|
}
|
||||||
return super.act();
|
return super.act();
|
||||||
@@ -152,7 +154,9 @@ public class Statue extends Mob {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void destroy() {
|
public void destroy() {
|
||||||
Notes.remove( Notes.Landmark.STATUE );
|
if (levelGenStatue) {
|
||||||
|
Notes.remove( Notes.Landmark.STATUE );
|
||||||
|
}
|
||||||
super.destroy();
|
super.destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+6
-2
@@ -672,8 +672,12 @@ public abstract class RegularLevel extends Level {
|
|||||||
|
|
||||||
//There are no statues or mimics (unless they were made allies)
|
//There are no statues or mimics (unless they were made allies)
|
||||||
for (Mob m : mobs.toArray(new Mob[0])){
|
for (Mob m : mobs.toArray(new Mob[0])){
|
||||||
if (m.alignment != Char.Alignment.ALLY && (m instanceof Statue || m instanceof Mimic)){
|
if (m.alignment != Char.Alignment.ALLY){
|
||||||
return false;
|
if (m instanceof Statue && ((Statue) m).levelGenStatue){
|
||||||
|
return false;
|
||||||
|
} else if (m instanceof Mimic){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+2
@@ -73,6 +73,8 @@ public class GuardianTrap extends Trap {
|
|||||||
|
|
||||||
EXP = 0;
|
EXP = 0;
|
||||||
state = WANDERING;
|
state = WANDERING;
|
||||||
|
|
||||||
|
levelGenStatue = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Guardian(){
|
public Guardian(){
|
||||||
|
|||||||
Reference in New Issue
Block a user