Examples of stepTest()


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

    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);
    assertEquals("Oh, I'm disappointed. You don't really have "
        + Grammar.a_noun(lastCloak) + " with you.", getReply(npc));
    final Item cloak = new Item(lastCloak, "", "", null);
    player.getSlot("bag").add(cloak);
    en.stepTest(player, lastCloak);
View Full Code Here

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

    en.stepTest(player, lastCloak);
    assertEquals("Oh, I'm disappointed. You don't really have "
        + Grammar.a_noun(lastCloak) + " with you.", getReply(npc));
    final Item cloak = new Item(lastCloak, "", "", null);
    player.getSlot("bag").add(cloak);
    en.stepTest(player, lastCloak);
    assertEquals("Answer to last brought cloak", "Oh, yay! You're so kind, I bet you'll have great Karma now! Here, take these killer boots. I think they're gorgeous but they don't fit me!", getReply(npc));
   
    // check the rewards
    assertEquals(karma + 5.0 + 100.0, player.getKarma(), 0.01);
    assertEquals(100000, player.getXP());
View Full Code Here

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

    final Player player = PlayerTestHelper.createPlayer("player");
   
    player.setQuest(OLD_QUEST, "done");
    player.setQuest(QUEST_NAME, "done");
   
    en.stepTest(player, ConversationPhrases.GREETING_MESSAGES.get(0));
    assertEquals("Message for the compatibility hack""Oh! I didn't reward you for helping me again! Here, take these boots. I think they're gorgeous but they don't fit me :(", getReply(npc));
    assertEquals("done;rewarded", player.getQuest(QUEST_NAME));
    assertTrue("The player got the boots", player.isEquipped("killer boots"));
   
    final Item boots = player.getFirstEquipped("killer boots");
View Full Code Here

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

    wc.addToWorld();
    final SpeakerNPC npc = wc.getNPC();
    final Engine en = npc.getEngine();
    final Player pl = PlayerTestHelper.createPlayer("player");

    assertTrue(en.stepTest(pl, "hi"));
    assertEquals(wc.welcomeBeforeStartingQuest(), getReply(npc));

    assertTrue(en.stepTest(pl, "quest"));
    assertEquals(wc.respondToQuest(), getReply(npc));
View Full Code Here

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

    final Player pl = PlayerTestHelper.createPlayer("player");

    assertTrue(en.stepTest(pl, "hi"));
    assertEquals(wc.welcomeBeforeStartingQuest(), getReply(npc));

    assertTrue(en.stepTest(pl, "quest"));
    assertEquals(wc.respondToQuest(), getReply(npc));

    assertTrue(en.stepTest(pl, "no"));
    assertEquals(wc.respondToQuestRefusal(), getReply(npc));
  }
View Full Code Here

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

    assertEquals(wc.welcomeBeforeStartingQuest(), getReply(npc));

    assertTrue(en.stepTest(pl, "quest"));
    assertEquals(wc.respondToQuest(), getReply(npc));

    assertTrue(en.stepTest(pl, "no"));
    assertEquals(wc.respondToQuestRefusal(), getReply(npc));
  }

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

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

    wc.addToWorld();
    final SpeakerNPC npc = wc.getNPC();
    final Engine en = npc.getEngine();
    final Player pl = PlayerTestHelper.createPlayer("pl");

    assertTrue(en.stepTest(pl, "hello"));
    assertEquals(wc.welcomeBeforeStartingQuest(), getReply(npc));

    assertTrue(en.stepTest(pl, "quest"));
    assertEquals(wc.respondToQuest(), getReply(npc));
View Full Code Here

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

    final Player pl = PlayerTestHelper.createPlayer("pl");

    assertTrue(en.stepTest(pl, "hello"));
    assertEquals(wc.welcomeBeforeStartingQuest(), getReply(npc));

    assertTrue(en.stepTest(pl, "quest"));
    assertEquals(wc.respondToQuest(), getReply(npc));

    assertTrue(en.stepTest(pl, "collection"));
    assertEquals(wc.firstAskForMissingItems(wc.getNeededItems()), getReply(npc));
View Full Code Here

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

    assertEquals(wc.welcomeBeforeStartingQuest(), getReply(npc));

    assertTrue(en.stepTest(pl, "quest"));
    assertEquals(wc.respondToQuest(), getReply(npc));

    assertTrue(en.stepTest(pl, "collection"));
    assertEquals(wc.firstAskForMissingItems(wc.getNeededItems()), getReply(npc));

    assertTrue(en.stepTest(pl, "yes"));
    assertEquals(wc.respondToQuestAcception(), getReply(npc));
View Full Code Here

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

    assertEquals(wc.respondToQuest(), getReply(npc));

    assertTrue(en.stepTest(pl, "collection"));
    assertEquals(wc.firstAskForMissingItems(wc.getNeededItems()), getReply(npc));

    assertTrue(en.stepTest(pl, "yes"));
    assertEquals(wc.respondToQuestAcception(), getReply(npc));

    //npc has stopped conversation

    assertTrue("the quest was accepted, so it should be started", wc.isStarted(pl));
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.