@Override protected boolean act() { if (Dungeon.level.heroFOV[pos]) { Notes.add( Notes.Landmark.STATUE ); } return super.act(); }
@Override public void activate() { InterlevelScene.returnDepth = Dungeon.depth; Belongings belongings = Dungeon.hero.belongings; for (Notes.Record rec : Notes.getRecords()){ if (rec.depth() == Dungeon.depth){ Notes.remove(rec); } } for (Item i : belongings){ if (i instanceof LloydsBeacon && ((LloydsBeacon) i).returnDepth == Dungeon.depth) ((LloydsBeacon) i).returnDepth = -1; } InterlevelScene.mode = InterlevelScene.Mode.RESET; Game.switchScene(InterlevelScene.class); } }
public static void complete() { weapon = null; armor = null; Notes.remove( Notes.Landmark.GHOST ); }
@Override protected void evolve() { int cell; boolean seen = false; for (int i=area.top-1; i <= area.bottom; i++) { for (int j = area.left-1; j <= area.right; j++) { cell = j + i* Dungeon.level.width(); if (Dungeon.level.insideMap(cell)) { off[cell] = cur[cell]; volume += off[cell]; if (off[cell] > 0 && Dungeon.level.visited[cell]) { seen = true; } } } } if (seen){ Notes.add(record()); } else { Notes.remove(record()); } }
public static ArrayList<Record> getRecords(){ return getRecords(Record.class); }
public void loadGameData(Record rec){ Bundle data = rec.gameData; Dungeon.hero = null; Dungeon.level = null; Generator.reset(); Notes.reset(); Dungeon.quickslot.reset(); QuickSlotButton.reset(); Bundle handler = data.getBundle(HANDLERS); Scroll.restore(handler); Potion.restore(handler); Ring.restore(handler); Badges.loadLocal(data.getBundle(BADGES)); Dungeon.hero = (Hero)data.get(HERO); Statistics.restoreFromBundle(data.getBundle(STATS)); Dungeon.challenges = data.getInt(CHALLENGES); }
Notes.storeInBundle( bundle ); Generator.storeInBundle( bundle );
Notes.restoreFromBundle( bundle );
public static void complete() { weapon = null; armor = null; Notes.remove( Notes.Landmark.GHOST ); }
@Override protected void evolve() { int cell; boolean seen = false; for (int i=area.top-1; i <= area.bottom; i++) { for (int j = area.left-1; j <= area.right; j++) { cell = j + i* Dungeon.level.width(); if (Dungeon.level.insideMap(cell)) { off[cell] = cur[cell]; volume += off[cell]; if (off[cell] > 0 && Dungeon.level.visited[cell]) { seen = true; } } } } if (seen){ Notes.add(record()); } else { Notes.remove(record()); } }
public static ArrayList<Record> getRecords(){ return getRecords(Record.class); }
public void loadGameData(Record rec){ Bundle data = rec.gameData; Dungeon.hero = null; Dungeon.level = null; Generator.reset(); Notes.reset(); Dungeon.quickslot.reset(); QuickSlotButton.reset(); Bundle handler = data.getBundle(HANDLERS); Scroll.restore(handler); Potion.restore(handler); Ring.restore(handler); Badges.loadLocal(data.getBundle(BADGES)); Dungeon.hero = (Hero)data.get(HERO); Statistics.restoreFromBundle(data.getBundle(STATS)); Dungeon.challenges = data.getInt(CHALLENGES); }
Notes.storeInBundle( bundle ); Generator.storeInBundle( bundle );
Notes.restoreFromBundle( bundle );
@Override protected boolean act() { if (Dungeon.level.heroFOV[pos]) { Notes.add( Notes.Landmark.STATUE ); } return super.act(); }
public static void complete() { reward = null; completed = true; Notes.remove( Notes.Landmark.IMP ); }
@Override public void activate() { InterlevelScene.returnDepth = Dungeon.depth; Belongings belongings = Dungeon.hero.belongings; for (Notes.Record rec : Notes.getRecords()){ if (rec.depth() == Dungeon.depth){ Notes.remove(rec); } } for (Item i : belongings){ if (i instanceof LloydsBeacon && ((LloydsBeacon) i).returnDepth == Dungeon.depth) ((LloydsBeacon) i).returnDepth = -1; } InterlevelScene.mode = InterlevelScene.Mode.RESET; Game.switchScene(InterlevelScene.class); } }
public void updateKeys(){ keys = new int[keyMap.size()+1]; for (Notes.KeyRecord rec : Notes.getRecords(Notes.KeyRecord.class)){ if (rec.depth() < Dungeon.depth){ //only ever 1 black key keys[0] = 1; } else if (rec.depth() == Dungeon.depth){ keys[keyMap.get(rec.type())] += rec.quantity(); } } totalKeys = 0; for (int k : keys){ totalKeys += k; } dirty = true; }