Examples of stepTest()


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

    // 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);
   
    en.stepTest(player, ConversationPhrases.GREETING_MESSAGES.get(0));
    assertEquals("Welcome back! Have you brought any #cloaks with you?", getReply(npc));
View Full Code Here

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

    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);
   
    en.stepTest(player, ConversationPhrases.GREETING_MESSAGES.get(0));
    assertEquals("Welcome back! Have you brought any #cloaks with you?", getReply(npc));
   
    en.stepTest(player, "cloaks");
    assertEquals(stillWantedMessage(player), getReply(npc));
   
View Full Code Here

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

    assertEquals(karma + 5.0, player.getKarma(), 0.01);
   
    en.stepTest(player, ConversationPhrases.GREETING_MESSAGES.get(0));
    assertEquals("Welcome back! Have you brought any #cloaks with you?", getReply(npc));
   
    en.stepTest(player, "cloaks");
    assertEquals(stillWantedMessage(player), getReply(npc));
   
    en.stepTest(player, "no");
    assertEquals("Okay then. Come back later.", getReply(npc));
   
View Full Code Here

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

    assertEquals("Welcome back! Have you brought any #cloaks with you?", getReply(npc));
   
    en.stepTest(player, "cloaks");
    assertEquals(stillWantedMessage(player), getReply(npc));
   
    en.stepTest(player, "no");
    assertEquals("Okay then. Come back later.", getReply(npc));
   
    // This is weird, but it's how the quest works at the moment
    en.stepTest(player, "no");
    assertEquals("Ok. If you want help, just say.", getReply(npc));
View Full Code Here

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

   
    en.stepTest(player, "no");
    assertEquals("Okay then. Come back later.", getReply(npc));
   
    // This is weird, but it's how the quest works at the moment
    en.stepTest(player, "no");
    assertEquals("Ok. If you want help, just say.", getReply(npc));
   
    /* Josephine does not know what to do with "bye" without CloakCollector,
       so do it manually. Jump over the greeting as it was already tested above */
    en.setCurrentState(ConversationStates.QUESTION_2);
 
View Full Code Here

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

   
    /* Josephine does not know what to do with "bye" without CloakCollector,
       so do it manually. Jump over the greeting as it was already tested above */
    en.setCurrentState(ConversationStates.QUESTION_2);
   
    en.stepTest(player, "yes");
    assertEquals("Woo! What #cloaks did you bring?", getReply(npc));
   
    // Give her all but the last - Thrice to test the possible answers 
    for (final String itemName : CLOAKS.subList(1, CLOAKS.size())) {
      en.stepTest(player, itemName);
View Full Code Here

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

    en.stepTest(player, "yes");
    assertEquals("Woo! What #cloaks did you bring?", getReply(npc));
   
    // Give her all but the last - Thrice to test the possible answers 
    for (final String itemName : CLOAKS.subList(1, CLOAKS.size())) {
      en.stepTest(player, itemName);
      assertEquals("Oh, I'm disappointed. You don't really have "
          + Grammar.a_noun(itemName) + " with you.", getReply(npc));
     
      final Item cloak = new Item(itemName, "", "", null);
      player.getSlot("bag").add(cloak);
View Full Code Here

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

      assertEquals("Oh, I'm disappointed. You don't really have "
          + Grammar.a_noun(itemName) + " with you.", getReply(npc));
     
      final Item cloak = new Item(itemName, "", "", null);
      player.getSlot("bag").add(cloak);
      en.stepTest(player, itemName);
      assertEquals("Wow, thank you! What else did you bring?", getReply(npc));
     
      en.stepTest(player, itemName);
      assertEquals("You're terribly forgetful, you already brought that one to me.", getReply(npc));
    }
View Full Code Here

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

      final Item cloak = new Item(itemName, "", "", null);
      player.getSlot("bag").add(cloak);
      en.stepTest(player, itemName);
      assertEquals("Wow, thank you! What else did you bring?", getReply(npc));
     
      en.stepTest(player, itemName);
      assertEquals("You're terribly forgetful, you already brought that one to me.", getReply(npc));
    }
   
    // check the message again now that it has changed
    en.stepTest(player, "cloaks");
View Full Code Here

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

      en.stepTest(player, itemName);
      assertEquals("You're terribly forgetful, you already brought that one to me.", getReply(npc));
    }
   
    // check the message again now that it has changed
    en.stepTest(player, "cloaks");
    assertEquals(stillWantedMessage(player), getReply(npc));
   
    // Give the last one too. Try lying first again just to be sure
    final String lastCloak = CLOAKS.get(0);
    en.stepTest(player, lastCloak);
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.