Examples of stepTest()


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

    //npc has stopped conversation

    assertTrue("the quest was accepted, so it should be started", wc.isStarted(pl));
    assertFalse(wc.isCompleted(pl));

    assertTrue(en.stepTest(pl, ConversationPhrases.GREETING_MESSAGES.get(0)));
    assertEquals(wc.welcomeDuringActiveQuest(), getReply(npc));
    npc.remove("text");
    en.stepTest(pl, ConversationPhrases.YES_MESSAGES.get(0));
    assertEquals(wc.askForItemsAfterPlayerSaidHeHasItems(), getReply(npc));
View Full Code Here

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

    assertFalse(wc.isCompleted(pl));

    assertTrue(en.stepTest(pl, ConversationPhrases.GREETING_MESSAGES.get(0)));
    assertEquals(wc.welcomeDuringActiveQuest(), getReply(npc));
    npc.remove("text");
    en.stepTest(pl, ConversationPhrases.YES_MESSAGES.get(0));
    assertEquals(wc.askForItemsAfterPlayerSaidHeHasItems(), getReply(npc));

    en.stepTest(pl, "bardiche");
    assertEquals(wc.respondToOfferOfNotExistingItem("bardiche"), getReply(npc));
View Full Code Here

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

    assertEquals(wc.welcomeDuringActiveQuest(), getReply(npc));
    npc.remove("text");
    en.stepTest(pl, ConversationPhrases.YES_MESSAGES.get(0));
    assertEquals(wc.askForItemsAfterPlayerSaidHeHasItems(), getReply(npc));

    en.stepTest(pl, "bardiche");
    assertEquals(wc.respondToOfferOfNotExistingItem("bardiche"), getReply(npc));

        Item cloak = new Item("bardiche", "", "", null);
    pl.getSlot("bag").add(cloak);
View Full Code Here

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

    assertEquals(wc.respondToOfferOfNotExistingItem("bardiche"), getReply(npc));

        Item cloak = new Item("bardiche", "", "", null);
    pl.getSlot("bag").add(cloak);

    assertTrue(en.stepTest(pl, "bardiche"));
    assertEquals(wc.respondToItemBrought(), getReply(npc));

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

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

    pl.getSlot("bag").add(cloak);

    assertTrue(en.stepTest(pl, "bardiche"));
    assertEquals(wc.respondToItemBrought(), getReply(npc));

    assertTrue(en.stepTest(pl, "bardiche"));
    assertEquals(wc.respondToOfferOfNotMissingItem(), getReply(npc));

    cloak = new Item("stone cloak", "", "", null);
    pl.getSlot("bag").add(cloak);
View Full Code Here

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

    final double karma = player.getKarma();
   
    // Greetings missing. Jump straight to attending
    en.setCurrentState(ConversationStates.ATTENDING);
   
    en.stepTest(player, ConversationPhrases.QUEST_MESSAGES.get(0));
    assertEquals("Make revenge! Kill de Mountain Orc Chief! unnerstand? ok?", getReply(npc));
   
    en.stepTest(player, "no");
    assertEquals("Answer to refusal", "Ugg! i want hooman make #task, kill!", getReply(npc));
    assertEquals("Karma penalty", karma - 6.0, player.getKarma(), 0.01);
View Full Code Here

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

    en.setCurrentState(ConversationStates.ATTENDING);
   
    en.stepTest(player, ConversationPhrases.QUEST_MESSAGES.get(0));
    assertEquals("Make revenge! Kill de Mountain Orc Chief! unnerstand? ok?", getReply(npc));
   
    en.stepTest(player, "no");
    assertEquals("Answer to refusal", "Ugg! i want hooman make #task, kill!", getReply(npc));
    assertEquals("Karma penalty", karma - 6.0, player.getKarma(), 0.01);
  }
 
  @Test
View Full Code Here

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

    // Kill a mountain orc chief to to allow checking the slot gets cleaned
    player.setSoloKill(VICTIM);
    // Greetings missing. Jump straight to attending
    en.setCurrentState(ConversationStates.ATTENDING);
   
    en.stepTest(player, ConversationPhrases.QUEST_MESSAGES.get(0));
    assertEquals("Make revenge! Kill de Mountain Orc Chief! unnerstand? ok?", getReply(npc));
   
    // test the stuff that should be done at the quest start
    en.stepTest(player, ConversationPhrases.YES_MESSAGES.get(0));
    assertEquals("Take dat key. he in jail. Kill! Denn, say me #kill! Say me #kill!", getReply(npc));
View Full Code Here

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

   
    en.stepTest(player, ConversationPhrases.QUEST_MESSAGES.get(0));
    assertEquals("Make revenge! Kill de Mountain Orc Chief! unnerstand? ok?", getReply(npc));
   
    // test the stuff that should be done at the quest start
    en.stepTest(player, ConversationPhrases.YES_MESSAGES.get(0));
    assertEquals("Take dat key. he in jail. Kill! Denn, say me #kill! Say me #kill!", getReply(npc));
    assertTrue(player.isEquipped(KEY_NAME));
    assertEquals("player", player.getFirstEquipped(KEY_NAME).getBoundTo());
    assertEquals("Karma bonus for accepting the quest",
      karma + 6.0, player.getKarma(), 0.01);
View Full Code Here

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

    assertEquals(questTokens[0],"mountain orc chief");
    assertEquals(questTokens[1],"0");
    assertEquals(questTokens[2],"1");
    assertEquals(Arrays.asList(questTokens).size(), 5);
   
    en.stepTest(player, ConversationPhrases.QUEST_MESSAGES.get(0));
    assertEquals("Make revenge! #Kill Mountain Orc Chief!", getReply(npc));
   
    en.stepTest(player, "kill");
    assertEquals("kill Mountain Orc Chief! Kotoch orcs nid revenge!", getReply(npc));
   
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.