v1.4.0: fixed summons from guardian trap counting as levelgen statues

This commit is contained in:
Evan Debenham
2022-10-03 13:15:26 -04:00
parent be9ff3a0ab
commit 539f1c8ea5
3 changed files with 14 additions and 4 deletions

View File

@@ -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();
}

View File

@@ -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;
}
}
}

View File

@@ -73,6 +73,8 @@ public class GuardianTrap extends Trap {
EXP = 0;
state = WANDERING;
levelGenStatue = false;
}
public Guardian(){