Examples of stepTest()


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

    assertEquals(
        "There are 3 weapons still missing from my newest collection: #'morning star', #staff, and #'great sword'."
            + " Do you have anything like that with you?",
        getReply(npc));

    assertTrue(en.stepTest(pl, "yes"));
    assertEquals("What did you find?", getReply(npc));

    Item weapon = new Item("morning star", "", "", null);
    pl.getSlot("bag").add(weapon);
View Full Code Here

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

    assertEquals("What did you find?", getReply(npc));

    Item weapon = new Item("morning star", "", "", null);
    pl.getSlot("bag").add(weapon);

    assertTrue(en.stepTest(pl, "morning star"));
    assertEquals("Thank you very much! Do you have anything more for me?",
        getReply(npc));

    assertTrue(en.stepTest(pl, "morning star"));
    assertEquals(
View Full Code Here

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

    assertTrue(en.stepTest(pl, "morning star"));
    assertEquals("Thank you very much! Do you have anything more for me?",
        getReply(npc));

    assertTrue(en.stepTest(pl, "morning star"));
    assertEquals(
        "I already have that one. Do you have any other weapon for me?",
        getReply(npc));

    for (final String cloakName : wc.getNeededItems()) {
View Full Code Here

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

    /*
     * Josephine should have nothing to say to us, unless we have completed
     * cloaks_collector quest. Those people would be getting the answer from
     *  that quest.
     */
    en.stepTest(player, ConversationPhrases.GREETING_MESSAGES.get(0));
    assertEquals("Josephines answer to non cloak1 people", null, getReply(npc));   
  }

  @Test
  public final void rejectQuest() {
View Full Code Here

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

    final Player player = PlayerTestHelper.createPlayer("player");
    final double karma = player.getKarma();
   
    // CloakCollector needs to be done to start this quest
    player.setQuest(OLD_QUEST, "done");
    en.stepTest(player, ConversationPhrases.GREETING_MESSAGES.get(0));
    assertEquals("Josephines first greeting""Hi again! I hear there's some new cloaks out, and I'm regretting not asking you about the ones I didn't like before. It feels like my #collection isn't complete...", getReply(npc));
   
    en.stepTest(player, "no");
    assertEquals("Answer to refusal", "Oh ... you're not very friendly. Please say yes?", getReply(npc));
    assertEquals("Karma penalty at refusal", karma - 5.0, player.getKarma(), 0.01);
View Full Code Here

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

    // CloakCollector needs to be done to start this quest
    player.setQuest(OLD_QUEST, "done");
    en.stepTest(player, ConversationPhrases.GREETING_MESSAGES.get(0));
    assertEquals("Josephines first greeting""Hi again! I hear there's some new cloaks out, and I'm regretting not asking you about the ones I didn't like before. It feels like my #collection isn't complete...", getReply(npc));
   
    en.stepTest(player, "no");
    assertEquals("Answer to refusal", "Oh ... you're not very friendly. Please say yes?", getReply(npc));
    assertEquals("Karma penalty at refusal", karma - 5.0, player.getKarma(), 0.01);
  }
 
  @Test
View Full Code Here

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

    final Player player = PlayerTestHelper.createPlayer("player");
    final double karma = player.getKarma();
   
    player.setQuest(OLD_QUEST, "done");

    en.stepTest(player, ConversationPhrases.GREETING_MESSAGES.get(0));
    assertEquals("Hi again! I hear there's some new cloaks out, and I'm regretting not asking you about the ones I didn't like before. It feels like my #collection isn't complete...", getReply(npc));
   
    en.stepTest(player, "collection");
    assertEquals("Answer to 'collection'",
        initiallyWantedMessage(player), getReply(npc));
View Full Code Here

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

    player.setQuest(OLD_QUEST, "done");

    en.stepTest(player, ConversationPhrases.GREETING_MESSAGES.get(0));
    assertEquals("Hi again! I hear there's some new cloaks out, and I'm regretting not asking you about the ones I didn't like before. It feels like my #collection isn't complete...", getReply(npc));
   
    en.stepTest(player, "collection");
    assertEquals("Answer to 'collection'",
        initiallyWantedMessage(player), getReply(npc));
   
    for (final String item : CLOAKS) {
      en.stepTest(player, item);
View Full Code Here

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

    en.stepTest(player, "collection");
    assertEquals("Answer to 'collection'",
        initiallyWantedMessage(player), getReply(npc));
   
    for (final String item : CLOAKS) {
      en.stepTest(player, item);
      final String expected = "You haven't seen one before? Well, it's a "
        + item
        + ". Sorry if that's not much help, it's all I know! So, will you find them all?";
      assertEquals(expected, getReply(npc));
    }
View Full Code Here

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

        + ". Sorry if that's not much help, it's all I know! So, will you find them all?";
      assertEquals(expected, getReply(npc));
    }

    // does not exist
    en.stepTest(player, "pink cloak");
    assertEquals("I don't know pink cloak. Can you name me another cloak please?", getReply(npc));

    en.stepTest(player, ConversationPhrases.YES_MESSAGES.get(0));
    assertEquals("Brilliant! I'm all excited again! Bye!", getReply(npc));
    assertEquals(karma + 5.0, player.getKarma(), 0.01);
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.