Package games.stendhal.server.entity.item

Examples of games.stendhal.server.entity.item.RingOfLife.damage()


    assertEquals("I am an expert on #'wedding rings' and #'emerald rings', sometimes called the ring of #life.", getReply(npc));
    assertTrue(en.step(player, "emerald"));
    assertEquals("I see you already have an emerald ring. If it gets broken, you can come to me to fix it.", getReply(npc));

    // break the ring don't give them money and make them lie that they have it
    ring.damage();
    assertTrue(en.step(player, "emerald"));
    assertEquals("What a pity, your emerald ring is broken. I can fix it, for a #price.", getReply(npc));
    assertTrue(en.step(player, "price"));
    assertEquals("The charge for my service is 80000 money, and I need 2 gold bars and 1 emerald to fix the ring. Do you want to pay now?", getReply(npc));
    assertTrue(en.step(player, "yes"));
View Full Code Here


    // -----------------------------------------------
    // this time say no they don't want to pay yet
    npc = SingletonRepository.getNPCList().get("Ognir");
    en = npc.getEngine();
    final RingOfLife ring = (RingOfLife) SingletonRepository.getEntityManager().getItem("emerald ring");
    ring.damage();
    player.getSlot("bag").add(ring);
    assertTrue(en.step(player, "hi"));
    assertEquals("Hi! Can I #help you?", getReply(npc));
    assertTrue(en.step(player, "help"));
    assertEquals("I am an expert on #'wedding rings' and #'emerald rings', sometimes called the ring of #life.", getReply(npc));
View Full Code Here

   */
  @Test
  public void testOrderEmeraldRing() {
   
    final RingOfLife ring = (RingOfLife) SingletonRepository.getEntityManager().getItem("emerald ring");
    ring.damage();
    player.equipToInventoryOnly(ring);
   
    PlayerTestHelper.equipWithMoney(player, 80000);
    PlayerTestHelper.equipWithStackableItem(player, "gold bar", 2);
    PlayerTestHelper.equipWithStackableItem(player, "emerald", 1);
View Full Code Here

   * Tests for giveBoundRingGetBoundRing.
   */
  @Test
  public void testgiveBoundRingGetBoundRing() {
    final RingOfLife ring = (RingOfLife) SingletonRepository.getEntityManager().getItem("emerald ring");
    ring.damage();
    player.equipToInventoryOnly(ring);
    ring.setBoundTo(player.getName());
    orderfixandfetchordered(player);
    final Item ringafter = player.getFirstEquipped("emerald ring");
    assertTrue(ringafter.isBound());
View Full Code Here

   * Tests for giveUnboundRingGetUnboundRing.
   */
  @Test
  public void testgiveUnboundRingGetUnboundRing() {
    final RingOfLife ring = (RingOfLife) SingletonRepository.getEntityManager().getItem("emerald ring");
    ring.damage();
    player.equipToInventoryOnly(ring);
   
    assertFalse(ring.isBound());
    orderfixandfetchordered(player);
    final Item ringafter = player.getFirstEquipped("emerald ring");
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.