/*-------------------------------------------------------------------------*/ public List<MazeEvent> execute(Maze maze, Point tile, Point previousTile, int facing) { if (MazeVariables.getBoolean(SirKay.SPAWN_CORROSIVE_SLIME) && !MazeVariables.getBoolean(SirKay.CORROSIVE_SLIME_SLAIN)) { return getList( new FlavourTextEvent( "In the depths of the sewers, you " + "stumble across a gigantic, living slime!"), new EncounterActorsEvent( CORROSIVE_SLIME_ENCOUNTER, CORROSIVE_SLIME_ENCOUNTER, null, null)); } else { return null; } }
/*-------------------------------------------------------------------------*/ public java.util.List<MazeEvent> execute(Maze maze, Point tile, Point previousTile, int facing) { if (preScript != null && !State.EMPTY.equalsIgnoreCase(MazeVariables.get(this.mazeVariable))) { return preScript.getEvents(); } else { return null; } }
/*-------------------------------------------------------------------------*/ public java.util.List<MazeEvent> handlePlayerAction( Maze maze, Point tile, int facing, int playerAction) { if (playerAction != PlayerAction.LOCKS) { return null; } if (State.EMPTY.equalsIgnoreCase(MazeVariables.get(this.mazeVariable))) { return null; } maze.encounterChest(this); return null; }
/*-------------------------------------------------------------------------*/ public void initialise(Maze maze, Point tile, int tileIndex) { if (!State.EMPTY.equalsIgnoreCase(MazeVariables.get(this.mazeVariable))) { engineObject.setTileIndex(tileIndex); maze.addObject(engineObject); } }
/*-------------------------------------------------------------------------*/ public void setState(String chestState) { MazeVariables.set(this.mazeVariable, chestState); }