Package games.stendhal.server.entity.npc.fsm

Examples of games.stendhal.server.entity.npc.fsm.Engine.step()


    }

    assertEquals(
        "At last, my collection is complete! Thank you very much; here, take this pair of swords in exchange!",
        getReply(npc));
    en.step(pl, ConversationPhrases.GOODBYE_MESSAGES.get(0));

    assertTrue(wc.isCompleted(pl));
  }
}
View Full Code Here


   */
  @Test
  public void testHiAndbye() {
    final SpeakerNPC npc = getNPC("Tad");
    final Engine en = npc.getEngine();
    en.step(player, ConversationPhrases.GREETING_MESSAGES.get(0));
    assertTrue(npc.isTalking());
    assertEquals(SSSHH_COME_HERE, getReply(npc));
    en.step(player, "task");
    assertTrue(npc.isTalking());
    assertEquals(
View Full Code Here

    final SpeakerNPC npc = getNPC("Tad");
    final Engine en = npc.getEngine();
    en.step(player, ConversationPhrases.GREETING_MESSAGES.get(0));
    assertTrue(npc.isTalking());
    assertEquals(SSSHH_COME_HERE, getReply(npc));
    en.step(player, "task");
    assertTrue(npc.isTalking());
    assertEquals(
        "I'm not feeling well... I need to get a bottle of medicine made. Can you fetch me an empty #flask?",
        getReply(npc));
    en.step(player, "flask");
View Full Code Here

    en.step(player, "task");
    assertTrue(npc.isTalking());
    assertEquals(
        "I'm not feeling well... I need to get a bottle of medicine made. Can you fetch me an empty #flask?",
        getReply(npc));
    en.step(player, "flask");
    assertTrue(npc.isTalking());
    assertEquals("You could probably get a flask from #Margaret.", getReply(npc));
    en.step(player, ConversationPhrases.GOODBYE_MESSAGES.get(0));
    assertFalse(npc.isTalking());
    assertEquals("Bye.", getReply(npc));
View Full Code Here

        "I'm not feeling well... I need to get a bottle of medicine made. Can you fetch me an empty #flask?",
        getReply(npc));
    en.step(player, "flask");
    assertTrue(npc.isTalking());
    assertEquals("You could probably get a flask from #Margaret.", getReply(npc));
    en.step(player, ConversationPhrases.GOODBYE_MESSAGES.get(0));
    assertFalse(npc.isTalking());
    assertEquals("Bye.", getReply(npc));
  }

  /**
 
View Full Code Here

   */
  @Test
  public void testHiNoAndHiAgain() {
    final SpeakerNPC npc = getNPC("Tad");
    final Engine en = npc.getEngine();
    en.step(player, ConversationPhrases.GREETING_MESSAGES.get(0));
    assertTrue(npc.isTalking());

    en.step(player, "task");
    assertTrue(npc.isTalking());
    assertEquals(
View Full Code Here

    final SpeakerNPC npc = getNPC("Tad");
    final Engine en = npc.getEngine();
    en.step(player, ConversationPhrases.GREETING_MESSAGES.get(0));
    assertTrue(npc.isTalking());

    en.step(player, "task");
    assertTrue(npc.isTalking());
    assertEquals(
        "I'm not feeling well... I need to get a bottle of medicine made. Can you fetch me an empty #flask?",
        getReply(npc));
    en.step(player, "No");
View Full Code Here

    en.step(player, "task");
    assertTrue(npc.isTalking());
    assertEquals(
        "I'm not feeling well... I need to get a bottle of medicine made. Can you fetch me an empty #flask?",
        getReply(npc));
    en.step(player, "No");
    assertTrue(npc.isTalking());
    assertEquals("Oh, please won't you change your mind? *sneeze*", getReply(npc));
    en.step(player, ConversationPhrases.GOODBYE_MESSAGES.get(0));
    assertFalse(npc.isTalking());
    assertFalse(player.hasQuest(QUEST_SLOT));
View Full Code Here

        "I'm not feeling well... I need to get a bottle of medicine made. Can you fetch me an empty #flask?",
        getReply(npc));
    en.step(player, "No");
    assertTrue(npc.isTalking());
    assertEquals("Oh, please won't you change your mind? *sneeze*", getReply(npc));
    en.step(player, ConversationPhrases.GOODBYE_MESSAGES.get(0));
    assertFalse(npc.isTalking());
    assertFalse(player.hasQuest(QUEST_SLOT));
    assertEquals("Bye.", getReply(npc));
    en.step(player, ConversationPhrases.GREETING_MESSAGES.get(0));
    assertTrue(npc.isTalking());
View Full Code Here

    assertEquals("Oh, please won't you change your mind? *sneeze*", getReply(npc));
    en.step(player, ConversationPhrases.GOODBYE_MESSAGES.get(0));
    assertFalse(npc.isTalking());
    assertFalse(player.hasQuest(QUEST_SLOT));
    assertEquals("Bye.", getReply(npc));
    en.step(player, ConversationPhrases.GREETING_MESSAGES.get(0));
    assertTrue(npc.isTalking());
    assertEquals(MedicineForTadTest.SSSHH_COME_HERE, getReply(npc));
    en.step(player, ConversationPhrases.GOODBYE_MESSAGES.get(0));
  }

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.