Examples of Present


Examples of games.stendhal.server.entity.item.Present

    final RPAction action = new RPAction();
    action.put("type", "wrap");
    action.put("target", "potion");
    wrap.onAction(player, action);
    assertTrue(player.isEquipped("present"));
    final Present present = (Present) player.getFirstEquipped("present");
    assertNotNull(present);
    assertThat(present.getInfoString(), is("potion"));
    present.onUsed(player);
    assertTrue(player.isEquipped("potion"));
  }
View Full Code Here

Examples of games.stendhal.server.entity.item.Present

    action.put("type", "wrap");
    action.put("target", "greater");
    action.put("args", "potion");
    wrap.onAction(player, action);
    assertTrue(player.isEquipped("present"));
    final Present present = (Present) player.getFirstEquipped("present");
    assertNotNull(present);
    assertThat(present.getInfoString(), is("greater potion"));
    present.onUsed(player);
    assertTrue(player.isEquipped("greater potion"));   
  }
View Full Code Here

Examples of games.stendhal.server.entity.item.Present

    action.put("type", "wrap");
    action.put("target", "mithril");
    action.put("args", "shield");
    wrap.onAction(player, action);
    assertTrue(player.isEquipped("present"));
    final Present present = (Present) player.getFirstEquipped("present");
    assertNotNull(present);
    assertThat(present.getInfoString(), is("mithril shield"));
    present.onUsed(player);
    assertTrue(player.isEquipped("mithril shield"));
  }
View Full Code Here

Examples of games.stendhal.server.entity.item.Present

    final Item item = player.getFirstEquipped(itemName);

    if (item != null) {
       
          final Present present = (Present) SingletonRepository.getEntityManager().getItem("present");
          present.setContent(itemName);
          player.drop(itemName);
          player.equipToInventoryOnly(present);

          new GameEvent(player.getName(), "wrap", itemName).raise();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.