Package iryrwarosh

Examples of iryrwarosh.Item


    terminal.write(player.rightHand().name(), player.rightHand().color());
  }

  @Override
  public Screen respondToUserInput(KeyEvent key) {
    Item item = world.item(player.position.x, player.position.y);
   
    switch (key.getKeyChar()){
    case 'z': player.swapLeftHand(world, item); return previous;
    case 'x': player.swapRightHand(world, item); return previous;
    }
View Full Code Here


      }
     
    });

    Creature creature = world.creature(startX + lookX, startY + lookY);
    Item item = world.item(startX + lookX, startY + lookY);
    Tile tile = world.tile(startX + lookX, startY + lookY);
   
    String text = null;
   
    if (creature != null && player.canSee(creature))
      text = creature.description();
    else if (item != null)
      text = item.name();
    else
      text = tile.description();

    if (text.length() > 78)
      text = text.substring(0, 75) + "...";
View Full Code Here

    terminal.write("evade: " + player.evadePercent(world) + "%", 54, 0, AsciiPanel.yellow, null);

    terminal.write(String.format("%3d" + (char)4, player.rupees()), 64, 0, Common.hsv(60, 25, 75), null);
   
    Item item = world.item(player.position.x, player.position.y);
    if (item != null && item.canBePickedUp()){
      terminal.write("[g] ", 0, 1);
      terminal.write(item.name(), item.color(), null);
      terminal.write(" (at your feet)");
    }

    terminal.setCursorPosition(69, 0);
    Color heartColor = player.isPoisoned() ? AsciiPanel.green : AsciiPanel.red;
View Full Code Here

 
  private void displayTiles(AsciiPanel terminal){
    for (int x = 0; x < screenWidth; x++)
    for (int y = 0; y < screenHeight; y++){
      Tile t = world.tile(x + getScrollX(), y + getScrollY());
      Item item = world.item(x + getScrollX(), y + getScrollY());
     
      if (item == null) {
        terminal.write(
            t.glyph(),
            x, y+1,
            t.color(),
            t.background());
      } else {
        terminal.write(
            item.glyph(),
            x, y+1,
            item.color(),
            t.background());
      }
    }
   
    for (Creature c : world.creatures()){
View Full Code Here

          if (rhs != this)
            return rhs;
          break;
        case KeyEvent.VK_G:
        case KeyEvent.VK_COMMA:
          Item item = world.item(player.position.x, player.position.y);
            if (item == null || !item.canBePickedUp()) {
                MessageBus.publish(new Note(world, player, "Nothing to pick up here"));
                return this; //Don't spend an action when nothing to pick up
            } else {
                return new PickupItemScreen(this, world, player);
            }
View Full Code Here

TOP

Related Classes of iryrwarosh.Item

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.