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