/*-------------------------------------------------------------------------*/
 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;
   }
 }
Exemplo n.º 2
0
 /*-------------------------------------------------------------------------*/
 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;
   }
 }
Exemplo n.º 3
0
  /*-------------------------------------------------------------------------*/
  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;
  }
Exemplo n.º 4
0
 /*-------------------------------------------------------------------------*/
 public void initialise(Maze maze, Point tile, int tileIndex) {
   if (!State.EMPTY.equalsIgnoreCase(MazeVariables.get(this.mazeVariable))) {
     engineObject.setTileIndex(tileIndex);
     maze.addObject(engineObject);
   }
 }
Exemplo n.º 5
0
 /*-------------------------------------------------------------------------*/
 public void setState(String chestState) {
   MazeVariables.set(this.mazeVariable, chestState);
 }