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
@@ -49,6 +49,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();
} }
@@ -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;
}
} }
} }
@@ -73,6 +73,8 @@ public class GuardianTrap extends Trap {
EXP = 0; EXP = 0;
state = WANDERING; state = WANDERING;
levelGenStatue = false;
} }
public Guardian(){ public Guardian(){